add an Info cab button
This commit is contained in:
parent
c22d4c5189
commit
8f5959920d
12 changed files with 23 additions and 1 deletions
|
@ -310,8 +310,12 @@ public class ItemsFragment extends android.support.v4.app.Fragment
|
|||
|
||||
@Override
|
||||
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
|
||||
final MenuItem menuItem = menu.findItem(R.id.cab_rename);
|
||||
MenuItem menuItem = menu.findItem(R.id.cab_rename);
|
||||
menuItem.setVisible(mSelectedItemsCnt == 1);
|
||||
|
||||
menuItem = menu.findItem(R.id.cab_info);
|
||||
menuItem.setVisible(mSelectedItemsCnt == 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -322,6 +326,10 @@ public class ItemsFragment extends android.support.v4.app.Fragment
|
|||
displayRenameDialog();
|
||||
mode.finish();
|
||||
return true;
|
||||
case R.id.cab_info:
|
||||
displayInfoDialog();
|
||||
mode.finish();
|
||||
return true;
|
||||
case R.id.cab_share:
|
||||
shareFiles();
|
||||
mode.finish();
|
||||
|
@ -365,6 +373,10 @@ public class ItemsFragment extends android.support.v4.app.Fragment
|
|||
startActivity(Intent.createChooser(sendIntent, shareTitle));
|
||||
}
|
||||
|
||||
private void displayInfoDialog() {
|
||||
|
||||
}
|
||||
|
||||
private void displayRenameDialog() {
|
||||
final List<Integer> itemIndexes = getSelectedItemIndexes();
|
||||
if (itemIndexes.isEmpty())
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/cab_info"
|
||||
android:icon="@mipmap/info"
|
||||
android:title="@string/info"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_rename"
|
||||
android:icon="@mipmap/edit"
|
||||
|
|
BIN
app/src/main/res/mipmap-hdpi/info.png
Normal file
BIN
app/src/main/res/mipmap-hdpi/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 755 B |
BIN
app/src/main/res/mipmap-mdpi/info.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 433 B |
BIN
app/src/main/res/mipmap-xhdpi/info.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/info.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/info.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -15,6 +15,7 @@
|
|||
<string name="delete">Löschen</string>
|
||||
<string name="undo">Rückgängig</string>
|
||||
<string name="rename">Umbenennen</string>
|
||||
<string name="info">Info</string>
|
||||
<string name="copy">Kopieren</string>
|
||||
<string name="copy_move">Copy/Move</string>
|
||||
<string name="share">Teilen</string>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<string name="delete">Elimina</string>
|
||||
<string name="undo">Annulla</string>
|
||||
<string name="rename">Rinomina</string>
|
||||
<string name="info">Info</string>
|
||||
<string name="copy">Copia</string>
|
||||
<string name="copy_move">Copy/Move</string>
|
||||
<string name="share">Condividi</string>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<string name="delete">削除</string>
|
||||
<string name="undo">元に戻す</string>
|
||||
<string name="rename">名前を変更</string>
|
||||
<string name="info">Info</string>
|
||||
<string name="copy">コピー</string>
|
||||
<string name="copy_move">Copy/Move</string>
|
||||
<string name="share">Dela</string>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<string name="delete">Ta bort</string>
|
||||
<string name="undo">Ångra</string>
|
||||
<string name="rename">Döp om</string>
|
||||
<string name="info">Info</string>
|
||||
<string name="copy">Kopiera</string>
|
||||
<string name="copy_move">Copy/Move</string>
|
||||
<string name="share">Dela</string>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<string name="delete">Delete</string>
|
||||
<string name="undo">Undo</string>
|
||||
<string name="rename">Rename</string>
|
||||
<string name="info">Info</string>
|
||||
<string name="copy">Copy</string>
|
||||
<string name="copy_move">Copy/Move</string>
|
||||
<string name="share">Share</string>
|
||||
|
|
Loading…
Reference in a new issue