mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 22:56:33 +02:00
Stable navigation menu, refactoring
This commit is contained in:
@@ -30,7 +30,7 @@ public class DrawerAdapter extends ArrayAdapter<DrawerItem> {
|
||||
}
|
||||
|
||||
if (tv != null) {
|
||||
tv.setText(item.getTitle());
|
||||
tv.setText(item.getTitle(getContext()));
|
||||
|
||||
tv.setTextColor(Helper.resolveColor(getContext(),
|
||||
item.getHighlight() ? R.attr.colorUnread : android.R.attr.textColorSecondary));
|
||||
@@ -39,6 +39,17 @@ public class DrawerAdapter extends ArrayAdapter<DrawerItem> {
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasStableIds() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
DrawerItem item = getItem(position);
|
||||
return (item == null ? 0 : item.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(int position) {
|
||||
DrawerItem item = getItem(position);
|
||||
|
||||
Reference in New Issue
Block a user