From 3f1f9ea9f25c44336f1a2c4aa4efd219889d95ed Mon Sep 17 00:00:00 2001 From: inorichi Date: Mon, 28 Dec 2015 18:06:07 +0100 Subject: [PATCH] Allow to reorder and rename categories --- .../data/database/DatabaseHelper.java | 7 +++ .../data/database/models/Category.java | 6 ++ .../data/database/tables/CategoryTable.java | 10 ++- .../base/adapter/ItemTouchHelperAdapter.java | 57 ++++++++++++++++++ .../ui/base/adapter/OnStartDragListener.java | 13 ++++ .../SimpleItemTouchHelperCallback.java | 43 +++++++++++++ .../ui/library/category/CategoryAdapter.java | 38 +++++++++--- .../ui/library/category/CategoryFragment.java | 39 ++++++++++-- .../ui/library/category/CategoryHolder.java | 15 ++++- .../category/CategoryItemTouchHelper.java | 16 +++++ .../library/category/CategoryPresenter.java | 31 +++++++++- .../ic_reorder_grey_600_24dp.png | Bin 0 -> 116 bytes .../ic_reorder_grey_600_24dp.png | Bin 0 -> 148 bytes .../ic_reorder_grey_600_24dp.png | Bin 0 -> 89 bytes .../ic_reorder_grey_600_24dp.png | Bin 0 -> 114 bytes .../ic_reorder_grey_600_24dp.png | Bin 0 -> 137 bytes .../ic_reorder_grey_600_24dp.png | Bin 0 -> 174 bytes .../main/res/layout/item_edit_categories.xml | 16 ++++- app/src/main/res/menu/category_selection.xml | 8 ++- app/src/main/res/values/strings.xml | 1 + 20 files changed, 280 insertions(+), 20 deletions(-) create mode 100644 app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/ItemTouchHelperAdapter.java create mode 100644 app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/OnStartDragListener.java create mode 100644 app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/SimpleItemTouchHelperCallback.java create mode 100644 app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryItemTouchHelper.java create mode 100644 app/src/main/res/drawable-hdpi/ic_reorder_grey_600_24dp.png create mode 100644 app/src/main/res/drawable-ldpi/ic_reorder_grey_600_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_reorder_grey_600_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_reorder_grey_600_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_reorder_grey_600_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_reorder_grey_600_24dp.png diff --git a/app/src/main/java/eu/kanade/mangafeed/data/database/DatabaseHelper.java b/app/src/main/java/eu/kanade/mangafeed/data/database/DatabaseHelper.java index 8beea887b2..9f1ef30553 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/database/DatabaseHelper.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/database/DatabaseHelper.java @@ -351,6 +351,7 @@ public class DatabaseHelper { .listOfObjects(Category.class) .withQuery(Query.builder() .table(CategoryTable.TABLE) + .orderBy(CategoryTable.COLUMN_ORDER) .build()) .prepare(); } @@ -361,6 +362,12 @@ public class DatabaseHelper { .prepare(); } + public PreparedPutCollectionOfObjects insertCategories(List categories) { + return db.put() + .objects(categories) + .prepare(); + } + public PreparedDeleteObject deleteCategory(Category category) { return db.delete() .object(category) diff --git a/app/src/main/java/eu/kanade/mangafeed/data/database/models/Category.java b/app/src/main/java/eu/kanade/mangafeed/data/database/models/Category.java index a06882af59..282c30cc2c 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/database/models/Category.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/database/models/Category.java @@ -16,6 +16,12 @@ public class Category implements Serializable { @StorIOSQLiteColumn(name = CategoryTable.COLUMN_NAME) public String name; + @StorIOSQLiteColumn(name = CategoryTable.COLUMN_ORDER) + public int order; + + @StorIOSQLiteColumn(name = CategoryTable.COLUMN_FLAGS) + public int flags; + public Category() {} public static Category create(String name) { diff --git a/app/src/main/java/eu/kanade/mangafeed/data/database/tables/CategoryTable.java b/app/src/main/java/eu/kanade/mangafeed/data/database/tables/CategoryTable.java index 36ba44a7d8..b440e57c87 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/database/tables/CategoryTable.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/database/tables/CategoryTable.java @@ -13,6 +13,12 @@ public class CategoryTable { @NonNull public static final String COLUMN_NAME = "name"; + @NonNull + public static final String COLUMN_ORDER = "sort"; + + @NonNull + public static final String COLUMN_FLAGS = "flags"; + // This is just class with Meta Data, we don't need instances private CategoryTable() { throw new IllegalStateException("No instances please"); @@ -24,7 +30,9 @@ public class CategoryTable { public static String getCreateTableQuery() { return "CREATE TABLE " + TABLE + "(" + COLUMN_ID + " INTEGER NOT NULL PRIMARY KEY, " - + COLUMN_NAME + " TEXT NOT NULL" + + COLUMN_NAME + " TEXT NOT NULL, " + + COLUMN_ORDER + " INTEGER NOT NULL, " + + COLUMN_FLAGS + " INTEGER NOT NULL" + ");"; } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/ItemTouchHelperAdapter.java b/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/ItemTouchHelperAdapter.java new file mode 100644 index 0000000000..9cf8266d20 --- /dev/null +++ b/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/ItemTouchHelperAdapter.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2015 Paul Burke + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package eu.kanade.mangafeed.ui.base.adapter; + +import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.helper.ItemTouchHelper; + +/** + * Interface to listen for a move or dismissal event from a {@link ItemTouchHelper.Callback}. + * + * @author Paul Burke (ipaulpro) + */ +public interface ItemTouchHelperAdapter { + + /** + * Called when an item has been dragged far enough to trigger a move. This is called every time + * an item is shifted, and not at the end of a "drop" event.
+ *
+ * Implementations should call {@link RecyclerView.Adapter#notifyItemMoved(int, int)} after + * adjusting the underlying data to reflect this move. + * + * @param fromPosition The start position of the moved item. + * @param toPosition Then resolved position of the moved item. + * + * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder) + * @see RecyclerView.ViewHolder#getAdapterPosition() + */ + void onItemMove(int fromPosition, int toPosition); + + + /** + * Called when an item has been dismissed by a swipe.
+ *
+ * Implementations should call {@link RecyclerView.Adapter#notifyItemRemoved(int)} after + * adjusting the underlying data to reflect this removal. + * + * @param position The position of the item dismissed. + * + * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder) + * @see RecyclerView.ViewHolder#getAdapterPosition() + */ + void onItemDismiss(int position); +} diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/OnStartDragListener.java b/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/OnStartDragListener.java new file mode 100644 index 0000000000..692e0fd4f1 --- /dev/null +++ b/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/OnStartDragListener.java @@ -0,0 +1,13 @@ +package eu.kanade.mangafeed.ui.base.adapter; + +import android.support.v7.widget.RecyclerView; + +public interface OnStartDragListener { + + /** + * Called when a view is requesting a start of a drag. + * + * @param viewHolder The holder of the view to drag. + */ + void onStartDrag(RecyclerView.ViewHolder viewHolder); +} \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/SimpleItemTouchHelperCallback.java b/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/SimpleItemTouchHelperCallback.java new file mode 100644 index 0000000000..525e9c2d52 --- /dev/null +++ b/app/src/main/java/eu/kanade/mangafeed/ui/base/adapter/SimpleItemTouchHelperCallback.java @@ -0,0 +1,43 @@ +package eu.kanade.mangafeed.ui.base.adapter; + +import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.helper.ItemTouchHelper; + +public class SimpleItemTouchHelperCallback extends ItemTouchHelper.Callback { + + private final ItemTouchHelperAdapter adapter; + + public SimpleItemTouchHelperCallback(ItemTouchHelperAdapter adapter) { + this.adapter = adapter; + } + + @Override + public boolean isLongPressDragEnabled() { + return true; + } + + @Override + public boolean isItemViewSwipeEnabled() { + return true; + } + + @Override + public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { + int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; + int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; + return makeMovementFlags(dragFlags, swipeFlags); + } + + @Override + public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, + RecyclerView.ViewHolder target) { + adapter.onItemMove(viewHolder.getAdapterPosition(), target.getAdapterPosition()); + return true; + } + + @Override + public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { + adapter.onItemDismiss(viewHolder.getAdapterPosition()); + } + +} \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryAdapter.java b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryAdapter.java index 50810a650f..e7daa28ded 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryAdapter.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryAdapter.java @@ -6,25 +6,29 @@ import android.view.ViewGroup; import com.amulyakhare.textdrawable.util.ColorGenerator; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import eu.davidea.flexibleadapter.FlexibleAdapter; import eu.kanade.mangafeed.R; import eu.kanade.mangafeed.data.database.models.Category; +import eu.kanade.mangafeed.ui.base.adapter.ItemTouchHelperAdapter; -public class CategoryAdapter extends FlexibleAdapter { - - private CategoryFragment fragment; - private ColorGenerator generator; +public class CategoryAdapter extends FlexibleAdapter implements + ItemTouchHelperAdapter { + + private final CategoryFragment fragment; + private final ColorGenerator generator; public CategoryAdapter(CategoryFragment fragment) { this.fragment = fragment; - setHasStableIds(true); generator = ColorGenerator.DEFAULT; + setHasStableIds(true); } public void setItems(List items) { - mItems = items; + mItems = new ArrayList<>(items); notifyDataSetChanged(); } @@ -42,7 +46,7 @@ public class CategoryAdapter extends FlexibleAdapter { public CategoryHolder onCreateViewHolder(ViewGroup parent, int viewType) { LayoutInflater inflater = LayoutInflater.from(fragment.getActivity()); View v = inflater.inflate(R.layout.item_edit_categories, parent, false); - return new CategoryHolder(v, this, fragment); + return new CategoryHolder(v, this, fragment, fragment); } @Override @@ -54,7 +58,23 @@ public class CategoryAdapter extends FlexibleAdapter { holder.itemView.setActivated(isSelected(position)); } - public ColorGenerator getColorGenerator() { - return generator; + @Override + public void onItemMove(int fromPosition, int toPosition) { + if (fromPosition < toPosition) { + for (int i = fromPosition; i < toPosition; i++) { + Collections.swap(mItems, i, i + 1); + } + } else { + for (int i = fromPosition; i > toPosition; i--) { + Collections.swap(mItems, i, i - 1); + } + } + + fragment.getPresenter().reorderCategories(mItems); + } + + @Override + public void onItemDismiss(int position) { + } } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryFragment.java b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryFragment.java index dc34b29d43..d46aa7966a 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryFragment.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryFragment.java @@ -6,6 +6,7 @@ import android.support.v4.content.res.ResourcesCompat; import android.support.v7.view.ActionMode; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.helper.ItemTouchHelper; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; @@ -22,6 +23,7 @@ import eu.kanade.mangafeed.R; import eu.kanade.mangafeed.data.database.models.Category; import eu.kanade.mangafeed.ui.base.activity.BaseActivity; import eu.kanade.mangafeed.ui.base.adapter.FlexibleViewHolder; +import eu.kanade.mangafeed.ui.base.adapter.OnStartDragListener; import eu.kanade.mangafeed.ui.base.fragment.BaseRxFragment; import eu.kanade.mangafeed.ui.decoration.DividerItemDecoration; import eu.kanade.mangafeed.ui.library.LibraryCategoryAdapter; @@ -29,14 +31,15 @@ import nucleus.factory.RequiresPresenter; import rx.Observable; @RequiresPresenter(CategoryPresenter.class) -public class CategoryFragment extends BaseRxFragment - implements ActionMode.Callback, FlexibleViewHolder.OnListItemClickListener { +public class CategoryFragment extends BaseRxFragment implements + ActionMode.Callback, FlexibleViewHolder.OnListItemClickListener, OnStartDragListener { @Bind(R.id.categories_list) RecyclerView recycler; @Bind(R.id.fab) FloatingActionButton fab; private CategoryAdapter adapter; private ActionMode actionMode; + private ItemTouchHelper touchHelper; public static CategoryFragment newInstance() { return new CategoryFragment(); @@ -56,12 +59,17 @@ public class CategoryFragment extends BaseRxFragment recycler.addItemDecoration(new DividerItemDecoration( ResourcesCompat.getDrawable(getResources(), R.drawable.line_divider, null))); + // Touch helper to drag and reorder categories + touchHelper = new ItemTouchHelper(new CategoryItemTouchHelper(adapter)); + touchHelper.attachToRecyclerView(recycler); + fab.setOnClickListener(v -> { new MaterialDialog.Builder(getActivity()) .title(R.string.action_add_category) .input(R.string.name, 0, false, (dialog, input) -> { getPresenter().createCategory(input.toString()); - }).show(); + }) + .show(); }); return view; @@ -105,6 +113,8 @@ public class CategoryFragment extends BaseRxFragment } else { setContextTitle(count); actionMode.invalidate(); + MenuItem editItem = actionMode.getMenu().findItem(R.id.action_edit); + editItem.setVisible(count == 1); } } @@ -128,7 +138,10 @@ public class CategoryFragment extends BaseRxFragment public boolean onActionItemClicked(ActionMode mode, MenuItem item) { switch (item.getItemId()) { case R.id.action_delete: - getPresenter().deleteCategories(getSelectedCategories()); + deleteCategories(getSelectedCategories()); + return true; + case R.id.action_edit: + editCategory(getSelectedCategories().get(0)); return true; } return false; @@ -147,4 +160,22 @@ public class CategoryFragment extends BaseRxFragment } } + private void deleteCategories(List categories) { + getPresenter().deleteCategories(categories); + } + + private void editCategory(Category category) { + new MaterialDialog.Builder(getActivity()) + .title(R.string.action_rename_category) + .input(getString(R.string.name), category.name, false, (dialog, input) -> { + getPresenter().renameCategory(category, input.toString()); + }) + .show(); + } + + @Override + public void onStartDrag(RecyclerView.ViewHolder viewHolder) { + touchHelper.startDrag(viewHolder); + } + } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryHolder.java b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryHolder.java index 9fdb179d7a..4d273c694f 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryHolder.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryHolder.java @@ -1,5 +1,7 @@ package eu.kanade.mangafeed.ui.library.category; +import android.support.v4.view.MotionEventCompat; +import android.view.MotionEvent; import android.view.View; import android.widget.ImageView; import android.widget.TextView; @@ -13,6 +15,7 @@ import butterknife.OnClick; import eu.kanade.mangafeed.R; import eu.kanade.mangafeed.data.database.models.Category; import eu.kanade.mangafeed.ui.base.adapter.FlexibleViewHolder; +import eu.kanade.mangafeed.ui.base.adapter.OnStartDragListener; public class CategoryHolder extends FlexibleViewHolder { @@ -20,11 +23,21 @@ public class CategoryHolder extends FlexibleViewHolder { @Bind(R.id.image) ImageView image; @Bind(R.id.title) TextView title; + @Bind(R.id.reorder) ImageView reorder; - public CategoryHolder(View view, CategoryAdapter adapter, OnListItemClickListener listener) { + public CategoryHolder(View view, CategoryAdapter adapter, + OnListItemClickListener listener, OnStartDragListener dragListener) { super(view, adapter, listener); ButterKnife.bind(this, view); this.view = view; + + reorder.setOnTouchListener((v, event) -> { + if (MotionEventCompat.getActionMasked(event) == MotionEvent.ACTION_DOWN) { + dragListener.onStartDrag(this); + return true; + } + return false; + }); } public void onSetValues(Category category, ColorGenerator generator) { diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryItemTouchHelper.java b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryItemTouchHelper.java new file mode 100644 index 0000000000..dd37e7a1dc --- /dev/null +++ b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryItemTouchHelper.java @@ -0,0 +1,16 @@ +package eu.kanade.mangafeed.ui.library.category; + +import eu.kanade.mangafeed.ui.base.adapter.ItemTouchHelperAdapter; +import eu.kanade.mangafeed.ui.base.adapter.SimpleItemTouchHelperCallback; + +public class CategoryItemTouchHelper extends SimpleItemTouchHelperCallback { + + public CategoryItemTouchHelper(ItemTouchHelperAdapter adapter) { + super(adapter); + } + + @Override + public boolean isItemViewSwipeEnabled() { + return false; + } +} \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryPresenter.java b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryPresenter.java index 42a9712459..930f530a1d 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryPresenter.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/library/category/CategoryPresenter.java @@ -15,6 +15,8 @@ public class CategoryPresenter extends BasePresenter { @Inject DatabaseHelper db; + private List categories; + private static final int GET_CATEGORIES = 1; @Override @@ -23,6 +25,7 @@ public class CategoryPresenter extends BasePresenter { restartableLatestCache(GET_CATEGORIES, () -> db.getCategories().createObservable() + .doOnNext(categories -> this.categories = categories) .observeOn(AndroidSchedulers.mainThread()), CategoryFragment::setCategories); @@ -30,10 +33,36 @@ public class CategoryPresenter extends BasePresenter { } public void createCategory(String name) { - db.insertCategory(Category.create(name)).createObservable().subscribe(); + Category cat = Category.create(name); + + // Set the new item in the last position + int max = 0; + if (categories != null) { + for (Category cat2 : categories) { + if (cat2.order > max) { + max = cat2.order + 1; + } + } + } + cat.order = max; + + db.insertCategory(cat).createObservable().subscribe(); } public void deleteCategories(List categories) { db.deleteCategories(categories).createObservable().subscribe(); } + + public void reorderCategories(List categories) { + for (int i = 0; i < categories.size(); i++) { + categories.get(i).order = i; + } + + db.insertCategories(categories).createObservable().subscribe(); + } + + public void renameCategory(Category category, String name) { + category.name = name; + db.insertCategory(category).createObservable().subscribe(); + } } diff --git a/app/src/main/res/drawable-hdpi/ic_reorder_grey_600_24dp.png b/app/src/main/res/drawable-hdpi/ic_reorder_grey_600_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..29a4975ffe7d8fbe430c16524eacc731b78601a8 GIT binary patch literal 116 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;wWo_?NX4yWjnoBvDH5g`9@0+& zZaJ`(957k2@Qc0VhQ>Cwz_ZzlH=0SoiISw;D+;ruSr~R(OkSsKy)6!C41=eupUXO@ GgeCx$CL(zN literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-ldpi/ic_reorder_grey_600_24dp.png b/app/src/main/res/drawable-ldpi/ic_reorder_grey_600_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..b5d38304b26a57577445286c2d327a9a3e3d624b GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a)4Xipc%kcwN$2@32VK7QQDWXR5V zhU>aP@-d#(p{v7=G8HoM$#4fTU*AyjGH7?~?lRT)H#RDZO0%78yrPi3ft5?GQDuAn w{drA23#BGGWU=jJyJX{Av|*A=;SvUhqmPfN+FjI`3bcm7)78&qol`;+0KuU$1^@s6 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_reorder_grey_600_24dp.png b/app/src/main/res/drawable-mdpi/ic_reorder_grey_600_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..3dbdf4e6c577766010b7749dfe99f86a62beb00d GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_*11y2{pkcwN$8mS7rMm);A|2rF| mWJ-KJyh6UMPo8Ze8^h$PX$MX-tHuD;GI+ZBxvX$4FM~p`J;RAB{0v5{3}(#Y%PvPte@Jk!1{%WP M>FVdQ&MBb@00Sr~)y?T(7fq{d0qu$#; zyIMKg^d^MsPmSgl0D}w80s4F#FVs))GcsmM3QU-0>87Ay&%&}K)xja^nM7m579I{T dc%hNOaOa9Iv-IrV~)y?&6B!GMR^P=D^v z+p1m}O&?gQWc^aVF#(kzzz3-UJ82NtLEoX15lH`GRAmEFAK0fz0I37=0ZBlLp&pwg eNCFHJ*dH+cPtU1nurinr67Y2Ob6Mw<&;$TJMJAO1 literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout/item_edit_categories.xml b/app/src/main/res/layout/item_edit_categories.xml index 2df67dfd02..97457cf7a0 100644 --- a/app/src/main/res/layout/item_edit_categories.xml +++ b/app/src/main/res/layout/item_edit_categories.xml @@ -21,14 +21,26 @@ android:layout_marginRight="@dimen/margin_right" android:layout_marginEnd="@dimen/margin_right"/> + + + + + app:showAsAction="ifRoom"/> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c93109e772..62928794f6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -24,6 +24,7 @@ Edit Add category Edit categories + Rename category Sort up Sort down Unread