implement the Properties dialog at the albums view
This commit is contained in:
parent
60536bfdf6
commit
97d6f2d452
1 changed files with 17 additions and 7 deletions
|
@ -27,6 +27,7 @@ import android.widget.EditText;
|
||||||
import android.widget.GridView;
|
import android.widget.GridView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog;
|
||||||
import com.simplemobiletools.gallery.Config;
|
import com.simplemobiletools.gallery.Config;
|
||||||
import com.simplemobiletools.gallery.Constants;
|
import com.simplemobiletools.gallery.Constants;
|
||||||
import com.simplemobiletools.gallery.R;
|
import com.simplemobiletools.gallery.R;
|
||||||
|
@ -250,9 +251,22 @@ public class MainActivity extends SimpleActivity
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private void updateGridView() {
|
private void showProperties() {
|
||||||
final DirectoryAdapter adapter = (DirectoryAdapter) mGridView.getAdapter();
|
final SparseBooleanArray items = mGridView.getCheckedItemPositions();
|
||||||
adapter.updateItems(mDirs);
|
if (items.size() == 1) {
|
||||||
|
new PropertiesDialog(this, (String) getSelectedPaths().toArray()[0], false);
|
||||||
|
} else {
|
||||||
|
final List<String> paths = new ArrayList<>(items.size());
|
||||||
|
final int cnt = items.size();
|
||||||
|
for (int i = 0; i < cnt; i++) {
|
||||||
|
if (items.valueAt(i)) {
|
||||||
|
final int id = items.keyAt(i);
|
||||||
|
paths.add(mDirs.get(id).getPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new PropertiesDialog(this, paths, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void editDirectory() {
|
private void editDirectory() {
|
||||||
|
@ -382,10 +396,6 @@ 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) {
|
||||||
|
|
Loading…
Reference in a new issue