Commit 78f14f75 authored by Mohit Mali's avatar Mohit Mali
Browse files

Icon changes and jar modification

parent 1e77eadb
Pipeline #97335 passed with stage
in 3 minutes and 59 seconds
......@@ -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);
......
......@@ -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);
......
......@@ -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" />
......
......@@ -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
......
......@@ -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>
......
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment