diff --git a/app/src/main/java/com/codekidlabs/storagechooserdemo/MainActivity.java b/app/src/main/java/com/codekidlabs/storagechooserdemo/MainActivity.java index a2b3fe3..0ce862d 100644 --- a/app/src/main/java/com/codekidlabs/storagechooserdemo/MainActivity.java +++ b/app/src/main/java/com/codekidlabs/storagechooserdemo/MainActivity.java @@ -1,7 +1,6 @@ package com.codekidlabs.storagechooserdemo; import android.Manifest; -import android.content.Context; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; @@ -134,20 +133,32 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onItemSelected(AdapterView adapterView, View view, int i, long l) { switch (i) { case 0: + builder.crunch(); builder.filter(null); break; case 1: + builder.crunch(); builder.filter(StorageChooser.FileType.VIDEO); break; case 2: + builder.crunch(); builder.filter(StorageChooser.FileType.AUDIO); break; case 3: + builder.crunch(); builder.filter(StorageChooser.FileType.DOCS); break; case 4: + builder.crunch(); builder.filter(StorageChooser.FileType.IMAGES); break; + case 5: + + ArrayList formats = new ArrayList<>(); + formats.add("txt"); + formats.add("mkv"); + builder.customFilter(formats); + break; } } @@ -192,7 +203,9 @@ public void onCancel() { chooser.setOnMultipleSelectListener(new StorageChooser.OnMultipleSelectListener() { @Override public void onDone(ArrayList selectedFilePaths) { - + for(String s: selectedFilePaths) { + Log.e(TAG, s); + } } }); @@ -204,7 +217,7 @@ public void onDone(ArrayList selectedFilePaths) { private StorageChooser.Theme getScTheme(boolean isChecked) { StorageChooser.Theme theme = new StorageChooser.Theme(getApplicationContext()); - theme.setScheme((isChecked) ? theme.getDefaultDarkScheme() : theme.getDefaultScheme()); + theme.setScheme((isChecked) ? getResources().getIntArray(R.array.paranoid_theme) : theme.getDefaultScheme()); return theme; } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index dbba3a3..d86d74d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -98,7 +98,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginTop="8dp" - android:text="setTheme" /> + android:text="setTheme (Dark)" /> #3fa19f #ececec + + + + + + #151515 + #2c9633 + #252525 + @android:color/white + #e1e1e1 + #2c9633 + + + #151515 + #252525 + @android:color/white + #151515 + @color/chevronBgColor + #2c9633 + #da6c6c + #2c9633 + #151515 + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 89ebce2..fabc685 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -10,5 +10,6 @@ Audio Documents Images + Custom