Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
Notes
Commits
78f14f75
Commit
78f14f75
authored
Jan 21, 2021
by
Mohit Mali
Browse files
Icon changes and jar modification
parent
1e77eadb
Pipeline
#97335
passed with stage
in 3 minutes and 59 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/notes/android/activity/NotesListViewActivity.java
View file @
78f14f75
...
...
@@ -388,8 +388,8 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
}
private
void
setupNavigationList
(
final
String
selectedItem
)
{
itemRecent
=
new
NavigationAdapter
.
NavigationItem
(
ADAPTER_KEY_RECENT
,
getString
(
R
.
string
.
label_all_notes
),
null
,
R
.
drawable
.
ic_access_time_grey600_24dp
);
itemFavorites
=
new
NavigationAdapter
.
NavigationItem
(
ADAPTER_KEY_STARRED
,
getString
(
R
.
string
.
label_favorites
),
null
,
R
.
drawable
.
ic_star_
yellow_24dp
);
itemRecent
=
new
NavigationAdapter
.
NavigationItem
(
ADAPTER_KEY_RECENT
,
getString
(
R
.
string
.
label_all_notes
),
null
,
lineageos
.
platform
.
R
.
drawable
.
ic_recent
);
itemFavorites
=
new
NavigationAdapter
.
NavigationItem
(
ADAPTER_KEY_STARRED
,
getString
(
R
.
string
.
label_favorites
),
null
,
lineageos
.
platform
.
R
.
drawable
.
ic_star_
filled
);
adapterCategories
=
new
NavigationAdapter
(
new
NavigationAdapter
.
ClickListener
()
{
@Override
public
void
onItemClick
(
NavigationAdapter
.
NavigationItem
item
)
{
...
...
@@ -523,9 +523,9 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
}
private
void
setupNavigationMenu
()
{
final
NavigationAdapter
.
NavigationItem
itemTrashbin
=
new
NavigationAdapter
.
NavigationItem
(
"trashbin"
,
getString
(
R
.
string
.
action_trashbin
),
null
,
R
.
drawable
.
ic_delete_grey600_24dp
);
final
NavigationAdapter
.
NavigationItem
itemSettings
=
new
NavigationAdapter
.
NavigationItem
(
"settings"
,
getString
(
R
.
string
.
action_settings
),
null
,
R
.
drawable
.
ic_settings
_grey600_24dp
);
final
NavigationAdapter
.
NavigationItem
itemAbout
=
new
NavigationAdapter
.
NavigationItem
(
"about"
,
getString
(
R
.
string
.
simple_about
),
null
,
R
.
drawable
.
ic_info_outline_grey600_24dp
);
final
NavigationAdapter
.
NavigationItem
itemTrashbin
=
new
NavigationAdapter
.
NavigationItem
(
"trashbin"
,
getString
(
R
.
string
.
action_trashbin
),
null
,
lineageos
.
platform
.
R
.
drawable
.
ic_bin
);
final
NavigationAdapter
.
NavigationItem
itemSettings
=
new
NavigationAdapter
.
NavigationItem
(
"settings"
,
getString
(
R
.
string
.
action_settings
),
null
,
lineageos
.
platform
.
R
.
drawable
.
ic_settings
);
final
NavigationAdapter
.
NavigationItem
itemAbout
=
new
NavigationAdapter
.
NavigationItem
(
"about"
,
getString
(
R
.
string
.
simple_about
),
null
,
lineageos
.
platform
.
R
.
drawable
.
ic_info
);
ArrayList
<
NavigationAdapter
.
NavigationItem
>
itemsMenu
=
new
ArrayList
<>();
itemsMenu
.
add
(
itemTrashbin
);
...
...
app/src/main/java/foundation/e/notes/model/NavigationAdapter.java
View file @
78f14f75
...
...
@@ -8,7 +8,6 @@ import androidx.annotation.Nullable;
import
androidx.core.graphics.ColorUtils
;
import
androidx.recyclerview.widget.RecyclerView
;
import
android.util.TypedValue
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -26,7 +25,7 @@ import foundation.e.notes.util.NoteUtil;
public
class
NavigationAdapter
extends
RecyclerView
.
Adapter
<
NavigationAdapter
.
ViewHolder
>
{
@DrawableRes
public
static
final
int
ICON_FOLDER
=
R
.
drawable
.
ic_folder
_grey600_24dp
;
public
static
final
int
ICON_FOLDER
=
lineageos
.
platform
.
R
.
drawable
.
ic_folder
;
@DrawableRes
public
static
final
int
ICON_NOFOLDER
=
R
.
drawable
.
ic_folder_open_grey600_24dp
;
@DrawableRes
...
...
@@ -101,16 +100,22 @@ public class NavigationAdapter extends RecyclerView.Adapter<NavigationAdapter.Vi
}
else
{
icon
.
setVisibility
(
View
.
GONE
);
}
// view.setBackgroundColor(isSelected ? view.getResources().getColor(R.color.bg_selected_item) : Color.TRANSPARENT);
view
.
setBackgroundColor
(
isSelected
?
ColorUtils
.
setAlphaComponent
(
view
.
getResources
().
getColor
(
R
.
color
.
accent_color
),
20
)
:
Color
.
TRANSPARENT
);
int
textColor
=
view
.
getResources
().
getColor
(
isSelected
?
R
.
color
.
accent_color
:
R
.
color
.
fg_default
);
int
unSelectedIconColor
=
view
.
getResources
().
getColor
(
isSelected
?
R
.
color
.
accent_color
:
R
.
color
.
drawer_menu_icon_color
);
name
.
setTextColor
(
textColor
);
count
.
setTextColor
(
textColor
);
icon
.
setColorFilter
(
isSelected
?
textColor
:
0
);
icon
.
setColorFilter
(
isSelected
?
textColor
:
unSelectedIconColor
);
}
}
// private Drawable reSizeIcon(Resources resources, Drawable drawable){
// Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap();
// Drawable resizeDrawable = new BitmapDrawable(resources, Bitmap.createScaledBitmap(bitmap, 24, 24, true));
// return resizeDrawable;
// }
public
interface
ClickListener
{
void
onItemClick
(
NavigationItem
item
);
...
...
app/src/main/res/layout/activity_notes_list_view.xml
View file @
78f14f75
...
...
@@ -15,7 +15,6 @@
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
android:theme=
"@style/AppTheme"
app:contentInsetStartWithNavigation=
"0dp"
app:elevation=
"4dp"
app:titleMarginStart=
"0dp"
/>
...
...
app/src/main/res/layout/item_navigation.xml
View file @
78f14f75
...
...
@@ -14,7 +14,8 @@
android:layout_height=
"44dp"
android:focusable=
"false"
android:padding=
"10dp"
android:scaleType=
"center"
android:scaleType=
"fitCenter"
android:layout_centerVertical=
"true"
android:src=
"@drawable/ic_folder_grey600_24dp"
/>
<TextView
...
...
app/src/main/res/values/colors.xml
View file @
78f14f75
...
...
@@ -25,6 +25,7 @@
<color
name=
"widget_background"
>
#DFFFFFFF
</color>
<color
name=
"widget_fg_default"
>
#000000
</color>
<color
name=
"widget_fg_contrast"
>
#ffffff
</color>
<color
name=
"drawer_menu_icon_color"
>
#7A7A7A
</color>
<color
name=
"category_background"
>
#FFF
</color>
<color
name=
"category_border"
>
@color/primary
</color>
...
...
e-ui-sdk.jar
View file @
78f14f75
No preview for this file type
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment