ToolBar, テキスト修正

This commit is contained in:
r-ca 2024-01-23 03:53:43 +09:00
parent b3d095fa40
commit 8e2af0c963
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
4 changed files with 6 additions and 4 deletions

View File

@ -104,7 +104,7 @@ public class HomeTopFragment extends Fragment {
if (FeatureSwitch.RecyclerView.useSimpleNotifyMethod) { if (FeatureSwitch.RecyclerView.useSimpleNotifyMethod) {
listItemAdapter.notifyDataSetChanged(); listItemAdapter.notifyDataSetChanged();
} else { } else {
// IndexOutOfBoundsExceptionを吐くことがあったので // IndexOutOfBoundsExceptionを吐くことがあったので いったん
listItemAdapter.notifyItemRangeInserted(0, listItems.size() - 1); listItemAdapter.notifyItemRangeInserted(0, listItems.size() - 1);
} }
}); });

View File

@ -276,6 +276,7 @@ public class LibraryPageFragment extends Fragment {
toolbar.setNavigationIcon(null); toolbar.setNavigationIcon(null);
} }
toolbar.setTitle(title); toolbar.setTitle(title);
toolbar.getMenu().clear();
toolbar.inflateMenu(R.menu.dir_menu); toolbar.inflateMenu(R.menu.dir_menu);
toolbar.setOnMenuItemClickListener(item -> { toolbar.setOnMenuItemClickListener(item -> {
if (item.getItemId() == R.id.menu_item_create_new_folder) { if (item.getItemId() == R.id.menu_item_create_new_folder) {

View File

@ -4,8 +4,8 @@
<item <item
android:id="@+id/menu_item_create_new_folder" android:id="@+id/menu_item_create_new_folder"
android:icon="@drawable/developer_mode_24px" android:icon="@drawable/create_new_folder_24px"
android:title="@string/app_name" android:title="@string/create_new_folder"
app:showAsAction="ifRoom"/> <!-- TODO-rca: change this --> app:showAsAction="never"/>
</menu> </menu>

View File

@ -1,3 +1,4 @@
<resources> <resources>
<string name="app_name">Library</string> <string name="app_name">Library</string>
<string name="create_new_folder">新しいフォルダを作成</string>
</resources> </resources>