mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
add a properties button to directories view
This commit is contained in:
parent
db2b1fedb3
commit
60536bfdf6
15 changed files with 20 additions and 5 deletions
|
@ -42,15 +42,12 @@ dependencies {
|
||||||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
|
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
|
||||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
||||||
compile 'com.booking:rtlviewpager:1.0.1'
|
compile 'com.booking:rtlviewpager:1.0.1'
|
||||||
|
compile 'com.simplemobiletools:fileproperties:1.0.2@aar'
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||||
|
|
||||||
apt 'com.jakewharton:butterknife-compiler:8.0.1'
|
apt 'com.jakewharton:butterknife-compiler:8.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.0.3'
|
ext.kotlin_version = '1.0.3'
|
||||||
repositories {
|
repositories {
|
||||||
|
|
|
@ -15,7 +15,6 @@ import android.support.design.widget.Snackbar;
|
||||||
import android.support.v4.app.ActivityCompat;
|
import android.support.v4.app.ActivityCompat;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.util.Log;
|
|
||||||
import android.util.SparseBooleanArray;
|
import android.util.SparseBooleanArray;
|
||||||
import android.view.ActionMode;
|
import android.view.ActionMode;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -383,6 +382,10 @@ public class MainActivity extends SimpleActivity
|
||||||
return type != null && (type.startsWith("video/") || type.equals(MediaStore.Video.Media.CONTENT_TYPE));
|
return type != null && (type.startsWith("video/") || type.equals(MediaStore.Video.Media.CONTENT_TYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showProperties() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
if (resultCode == RESULT_OK) {
|
if (resultCode == RESULT_OK) {
|
||||||
|
@ -475,6 +478,9 @@ public class MainActivity extends SimpleActivity
|
||||||
@Override
|
@Override
|
||||||
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
|
case R.id.cab_properties:
|
||||||
|
showProperties();
|
||||||
|
return true;
|
||||||
case R.id.cab_edit:
|
case R.id.cab_edit:
|
||||||
editDirectory();
|
editDirectory();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<item
|
||||||
|
android:id="@+id/cab_properties"
|
||||||
|
android:icon="@mipmap/info"
|
||||||
|
android:title="@string/properties"
|
||||||
|
app:showAsAction="ifRoom"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_edit"
|
android:id="@+id/cab_edit"
|
||||||
android:icon="@mipmap/rename"
|
android:icon="@mipmap/rename"
|
||||||
|
|
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 |
|
@ -9,6 +9,7 @@
|
||||||
<string name="edit">Bearbeiten</string>
|
<string name="edit">Bearbeiten</string>
|
||||||
<string name="undo">Rückgängig</string>
|
<string name="undo">Rückgängig</string>
|
||||||
<string name="share">Teilen</string>
|
<string name="share">Teilen</string>
|
||||||
|
<string name="properties">Eigenschaften</string>
|
||||||
<string name="rename_file">Datei umbenennen</string>
|
<string name="rename_file">Datei umbenennen</string>
|
||||||
<string name="rename_folder">Ordner umbenennen</string>
|
<string name="rename_folder">Ordner umbenennen</string>
|
||||||
<string name="rename_file_error">Konnte die Datei nicht umbenennen</string>
|
<string name="rename_file_error">Konnte die Datei nicht umbenennen</string>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="undo">Deshacer</string>
|
<string name="undo">Deshacer</string>
|
||||||
<string name="share">Compartir</string>
|
<string name="share">Compartir</string>
|
||||||
|
<string name="properties">Properties</string>
|
||||||
<string name="rename_file">Renombrar archivo</string>
|
<string name="rename_file">Renombrar archivo</string>
|
||||||
<string name="rename_folder">Renombrar carpeta</string>
|
<string name="rename_folder">Renombrar carpeta</string>
|
||||||
<string name="rename_file_error">No se pudo renombrar el archivo</string>
|
<string name="rename_file_error">No se pudo renombrar el archivo</string>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="undo">Annulla</string>
|
<string name="undo">Annulla</string>
|
||||||
<string name="share">Condividi</string>
|
<string name="share">Condividi</string>
|
||||||
|
<string name="properties">Proprietà</string>
|
||||||
<string name="rename_file">Rinomina file</string>
|
<string name="rename_file">Rinomina file</string>
|
||||||
<string name="rename_folder">Rinomina cartella</string>
|
<string name="rename_folder">Rinomina cartella</string>
|
||||||
<string name="rename_file_error">Impossibile rinominare il file</string>
|
<string name="rename_file_error">Impossibile rinominare il file</string>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="undo">元に戻す</string>
|
<string name="undo">元に戻す</string>
|
||||||
<string name="share">共有</string>
|
<string name="share">共有</string>
|
||||||
|
<string name="properties">Properties</string>
|
||||||
<string name="rename_file">ファイルの名前を変更</string>
|
<string name="rename_file">ファイルの名前を変更</string>
|
||||||
<string name="rename_folder">フォルダーの名前を変更</string>
|
<string name="rename_folder">フォルダーの名前を変更</string>
|
||||||
<string name="rename_file_error">ファイルの名前を変更できませんでした</string>
|
<string name="rename_file_error">ファイルの名前を変更できませんでした</string>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="undo">Desfazer</string>
|
<string name="undo">Desfazer</string>
|
||||||
<string name="share">Partilhar</string>
|
<string name="share">Partilhar</string>
|
||||||
|
<string name="properties">Propriedades</string>
|
||||||
<string name="rename_file">Renomear ficheiro</string>
|
<string name="rename_file">Renomear ficheiro</string>
|
||||||
<string name="rename_folder">Renomear pasta</string>
|
<string name="rename_folder">Renomear pasta</string>
|
||||||
<string name="rename_file_error">Não foi possível renomear o ficheiro</string>
|
<string name="rename_file_error">Não foi possível renomear o ficheiro</string>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="undo">Ångra</string>
|
<string name="undo">Ångra</string>
|
||||||
<string name="share">Dela</string>
|
<string name="share">Dela</string>
|
||||||
|
<string name="properties">Properties</string>
|
||||||
<string name="rename_file">Döp om fil</string>
|
<string name="rename_file">Döp om fil</string>
|
||||||
<string name="rename_folder">Döp om mapp</string>
|
<string name="rename_folder">Döp om mapp</string>
|
||||||
<string name="rename_file_error">Det gick inte att döpa om filen</string>
|
<string name="rename_file_error">Det gick inte att döpa om filen</string>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="undo">Undo</string>
|
<string name="undo">Undo</string>
|
||||||
<string name="share">Share</string>
|
<string name="share">Share</string>
|
||||||
|
<string name="properties">Properties</string>
|
||||||
<string name="rename_file">Rename file</string>
|
<string name="rename_file">Rename file</string>
|
||||||
<string name="rename_folder">Rename folder</string>
|
<string name="rename_folder">Rename folder</string>
|
||||||
<string name="rename_file_error">Could not rename the file</string>
|
<string name="rename_file_error">Could not rename the file</string>
|
||||||
|
|
Loading…
Reference in a new issue