mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-22 21:06:09 +03:00
Update: subcategory enhancement #1154 solved
This commit is contained in:
parent
2a2ed1839b
commit
77ddc77df5
2 changed files with 6 additions and 1 deletions
|
@ -350,7 +350,7 @@ public class MainViewModel extends AndroidViewModel {
|
||||||
lastSecondaryCategory.icon = NavigationAdapter.ICON_SUB_MULTIPLE;
|
lastSecondaryCategory.icon = NavigationAdapter.ICON_SUB_MULTIPLE;
|
||||||
} else if (belongsToLastPrimaryCategory) {
|
} else if (belongsToLastPrimaryCategory) {
|
||||||
if (isCategoryOpen) {
|
if (isCategoryOpen) {
|
||||||
item.label = currentPrimaryCategory + "/" + currentSecondaryCategory;
|
item.label = currentSecondaryCategory;
|
||||||
item.id = "category:" + item.label;
|
item.id = "category:" + item.label;
|
||||||
item.icon = NavigationAdapter.ICON_SUB_FOLDER;
|
item.icon = NavigationAdapter.ICON_SUB_FOLDER;
|
||||||
items.add(item);
|
items.add(item);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package it.niedermann.owncloud.notes.main.navigation;
|
package it.niedermann.owncloud.notes.main.navigation;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -59,5 +60,9 @@ class NavigationViewHolder extends RecyclerView.ViewHolder {
|
||||||
icon.setColorFilter(isSelected ? textColor : 0);
|
icon.setColorFilter(isSelected ? textColor : 0);
|
||||||
|
|
||||||
view.setSelected(isSelected);
|
view.setSelected(isSelected);
|
||||||
|
|
||||||
|
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
|
||||||
|
params.leftMargin = item.icon == NavigationAdapter.ICON_SUB_FOLDER ? 70 : 0;
|
||||||
|
view.requestLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue