├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── zaphlabs │ │ │ └── knotFileExplorer │ │ │ └── MainActivity.kt │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── zaphlabs │ │ │ └── knotFileExplorer │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── zaphlabs │ │ └── knotFileExplorer │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── filechooser ├── .gitignore ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── attrs.xml │ │ │ ├── drawable │ │ │ │ ├── home.xml │ │ │ │ ├── back.xml │ │ │ │ ├── folder.xml │ │ │ │ ├── forward.xml │ │ │ │ ├── video.xml │ │ │ │ ├── archive.xml │ │ │ │ ├── empty.xml │ │ │ │ ├── items.xml │ │ │ │ ├── asterisk.xml │ │ │ │ ├── new_folder.xml │ │ │ │ ├── details.xml │ │ │ │ ├── code.xml │ │ │ │ ├── search.xml │ │ │ │ ├── audio.xml │ │ │ │ ├── lock.xml │ │ │ │ ├── avi.xml │ │ │ │ ├── flv.xml │ │ │ │ ├── txt.xml │ │ │ │ ├── pdf.xml │ │ │ │ ├── mov.xml │ │ │ │ ├── png.xml │ │ │ │ ├── jpg.xml │ │ │ │ ├── mp3.xml │ │ │ │ ├── doc.xml │ │ │ │ ├── db_file.xml │ │ │ │ ├── database.xml │ │ │ │ └── json.xml │ │ │ └── layout │ │ │ │ ├── dialog_empty_folder.xml │ │ │ │ ├── file_item.xml │ │ │ │ └── dialog_file_chooser.xml │ │ └── java │ │ │ └── com │ │ │ └── zaphlabs │ │ │ └── filechooser │ │ │ ├── filters │ │ │ ├── Filter.kt │ │ │ ├── RegExFilter.kt │ │ │ └── ExtensionFilter.kt │ │ │ ├── utils │ │ │ ├── DateUtil.kt │ │ │ ├── FileType.kt │ │ │ └── FileHelper.kt │ │ │ ├── Sorter.kt │ │ │ ├── preference │ │ │ └── ChooserSharedPreference.kt │ │ │ └── KnotFileChooser.kt │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── zaphlabs │ │ │ └── filechooser │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── zaphlabs │ │ └── filechooser │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── Screenshot_1565945793.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── encodings.xml ├── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── vcs.xml ├── misc.xml ├── runConfigurations.xml └── gradle.xml ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── gradlew ├── README.md └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /filechooser/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':filechooser' 2 | -------------------------------------------------------------------------------- /Screenshot_1565945793.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/Screenshot_1565945793.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | KnotFileExplorer 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /filechooser/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /filechooser/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #fff44336 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iammohdzaki/KnotFileChooser-Android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Aug 15 13:33:14 IST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /filechooser/src/main/java/com/zaphlabs/filechooser/filters/Filter.kt: -------------------------------------------------------------------------------- 1 | package com.zaphlabs.filechooser.filters 2 | 3 | 4 | import java.io.File 5 | import java.io.FileFilter 6 | 7 | abstract class Filter(private val filter: Filter? = null) : FileFilter { 8 | 9 | open fun filter(file: File): Boolean { 10 | return true 11 | } 12 | 13 | final override fun accept(file: File): Boolean { 14 | return filter(file) && (filter?.accept(file) ?: true) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/test/java/com/zaphlabs/knotFileExplorer/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.zaphlabs.knotFileExplorer 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /filechooser/src/test/java/com/zaphlabs/filechooser/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.zaphlabs.filechooser; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #FFFFFF 7 | #cfcf09 8 | #26840a 9 | #d4d4d4 10 | #4d4d4d 11 | #0897a7 12 | 13 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/home.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/back.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/folder.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/forward.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/video.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/archive.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/java/com/zaphlabs/filechooser/filters/RegExFilter.kt: -------------------------------------------------------------------------------- 1 | package com.zaphlabs.filechooser.filters 2 | 3 | import java.io.File 4 | import java.util.regex.Pattern 5 | 6 | open class RegexFilter( 7 | regex: String, 8 | private val applyToFolders: Boolean = false, 9 | filter: Filter? = null 10 | ) : Filter(filter) { 11 | 12 | private val pattern = Pattern.compile(regex) 13 | 14 | override fun filter(file: File): Boolean { 15 | return if (applyToFolders || file.isFile) { 16 | pattern.matcher(file.name).matches() 17 | } else { 18 | true 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/items.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/java/com/zaphlabs/filechooser/filters/ExtensionFilter.kt: -------------------------------------------------------------------------------- 1 | package com.zaphlabs.filechooser.filters 2 | 3 | import com.zaphlabs.filechooser.utils.isFolder 4 | import java.io.File 5 | 6 | open class ExtensionFilter( 7 | filter: Filter? = null, 8 | private vararg val extensions: String 9 | ) : Filter() { 10 | 11 | override fun filter(file: File): Boolean { 12 | return if (file.isFolder) { 13 | true 14 | } else { 15 | extensions.forEach { 16 | if (it.compareTo(file.extension, true) == 0) return true 17 | } 18 | false 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /filechooser/src/main/res/layout/dialog_empty_folder.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /filechooser/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FileChooser 3 | %d item 4 | %d items 5 | %d selected item (%s) 6 | %d selected items (%s) 7 | Type the folder name here 8 | Create a new folder 9 | Back 10 | Home 11 | Search 12 | 13 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/asterisk.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/new_folder.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/details.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/code.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/zaphlabs/knotFileExplorer/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.zaphlabs.knotFileExplorer 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.zaphlabs.knotFileExplorer", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/search.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /filechooser/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/audio.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /filechooser/src/main/res/drawable/lock.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |