├── app ├── .gitignore ├── src │ └── main │ │ ├── assets │ │ └── folder │ │ │ ├── file.txt │ │ │ ├── folder1 │ │ │ ├── file1.txt │ │ │ ├── folder2 │ │ │ │ ├── file2.txt │ │ │ │ ├── folder3 │ │ │ │ │ ├── file3.txt │ │ │ │ │ ├── font3.ttf │ │ │ │ │ └── icon3.png │ │ │ │ ├── font2.ttf │ │ │ │ └── icon2.png │ │ │ ├── font1.ttf │ │ │ └── icon1.png │ │ │ ├── font.ttf │ │ │ └── icon.png │ │ ├── res │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── values │ │ │ ├── ic_launcher_background.xml │ │ │ ├── colors.xml │ │ │ ├── styles.xml │ │ │ └── strings.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── xml │ │ │ └── backup_descriptor.xml │ │ └── layout │ │ │ ├── activity_main.xml │ │ │ ├── fragment_core.xml │ │ │ └── fragment_core_ext.xml │ │ ├── kotlin │ │ └── com │ │ │ └── github │ │ │ └── jonathanmerritt │ │ │ └── rxassetmanager │ │ │ ├── extensions │ │ │ ├── View.kt │ │ │ └── Fragment.kt │ │ │ ├── AssetPath.kt │ │ │ ├── MainActivity.kt │ │ │ ├── CoreFragment.kt │ │ │ ├── RxAssetManagerFragment.kt │ │ │ └── CoreExtFragment.kt │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── core ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ └── values │ │ │ └── strings.xml │ │ └── kotlin │ │ └── com │ │ └── github │ │ └── jonathanmerritt │ │ └── rxassetmanager │ │ └── core │ │ ├── IsRxAssetManager.kt │ │ └── RxAssetManager.kt ├── proguard-rules.pro └── build.gradle ├── core-ext ├── .gitignore ├── proguard-rules.pro ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ └── values │ │ │ └── strings.xml │ │ └── kotlin │ │ └── com │ │ └── github │ │ └── jonathanmerritt │ │ └── rxassetmanager │ │ └── core │ │ └── ext │ │ ├── extensions │ │ └── String.kt │ │ ├── Sorting.kt │ │ ├── IsRxAssetManager.kt │ │ └── RxAssetManager.kt └── build.gradle ├── promo ├── banner.png └── logo.png ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── maven.gradle ├── bintray.gradle └── dokka.gradle ├── .gitignore ├── RELEASES.md ├── settings.gradle ├── gradle.properties ├── .travis.yml ├── README.md └── LICENSE.txt /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /core/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /core-ext/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/src/main/assets/folder/file.txt: -------------------------------------------------------------------------------- 1 | Example file. -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/file1.txt: -------------------------------------------------------------------------------- 1 | Example file number one. -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/folder2/file2.txt: -------------------------------------------------------------------------------- 1 | Example file number two. -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/folder2/folder3/file3.txt: -------------------------------------------------------------------------------- 1 | Example file number three. -------------------------------------------------------------------------------- /promo/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/promo/banner.png -------------------------------------------------------------------------------- /promo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/promo/logo.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/assets/folder/font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/assets/folder/font.ttf -------------------------------------------------------------------------------- /app/src/main/assets/folder/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/assets/folder/icon.png -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/font1.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/assets/folder/folder1/font1.ttf -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/assets/folder/folder1/icon1.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/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/JonathanMerritt/RxAssetManager/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/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/folder2/font2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/assets/folder/folder1/folder2/font2.ttf -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/folder2/icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/assets/folder/folder1/folder2/icon2.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/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/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/folder2/folder3/font3.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/assets/folder/folder1/folder2/folder3/font3.ttf -------------------------------------------------------------------------------- /app/src/main/assets/folder/folder1/folder2/folder3/icon3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonathanMerritt/RxAssetManager/HEAD/app/src/main/assets/folder/folder1/folder2/folder3/icon3.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDEA 2 | *.iml 3 | /.idea 4 | 5 | # Gradle 6 | .gradle 7 | build 8 | 9 | # Gradle Android 10 | /local.properties 11 | /gradlew.bat 12 | /gradlew 13 | /publish 14 | /publish.bat 15 | -------------------------------------------------------------------------------- /RELEASES.md: -------------------------------------------------------------------------------- 1 | ### Minor: v0.6.0 2 | _April 4, 2018_ 3 | 4 | - Use kotlin. 5 | - Add dokka and task updates. 6 | - Refactor and update copyright. 7 | 8 | 9 | ### Patch: v0.0.1 10 | _February 19, 2018_ 11 | 12 | - Initial release. 13 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 11 01:01:26 EDT 2018 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-4.8-rc-1-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 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | include ":app", ":core", ":core-ext" 18 | -------------------------------------------------------------------------------- /core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | -------------------------------------------------------------------------------- /core/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | Core 19 | 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /core/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 | -------------------------------------------------------------------------------- /core-ext/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 | -------------------------------------------------------------------------------- /core-ext/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | -------------------------------------------------------------------------------- /core-ext/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | Core-Ext 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_descriptor.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/extensions/View.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager.extensions 18 | 19 | import android.view.View 20 | 21 | internal infix fun View.click(action: () -> Boolean) = setOnClickListener { action() } 22 | -------------------------------------------------------------------------------- /app/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/extensions/Fragment.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager.extensions 18 | 19 | import androidx.fragment.app.Fragment 20 | 21 | internal inline val Fragment.cacheDir: String get() = context!!.cacheDir.absolutePath 22 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | #f5f5f5 20 | #FF757575 21 | #FF009688 22 | 23 | -------------------------------------------------------------------------------- /core-ext/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/core/ext/extensions/String.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager.core.ext.extensions 18 | 19 | internal fun String.isXml() = isNotBlank() && endsWith(".xml") 20 | internal fun String.isFile() = isNotBlank() && contains(".") 21 | internal fun String.isImage() = isNotBlank() && (endsWith(".jpg") || endsWith(".png") || endsWith(".bmp")) 22 | internal fun String.isFont() = isNotBlank() && (endsWith(".ttf") || endsWith(".otf")) 23 | -------------------------------------------------------------------------------- /app/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/AssetPath.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager 18 | 19 | internal const val ROOT = "/" 20 | internal const val MANIFEST = "AndroidManifest.xml" 21 | internal const val FOLDER = "folder" 22 | internal const val FILE = "folder/file.txt" 23 | internal const val ICON = "folder/icon.png" 24 | internal const val FONT = "folder/font.ttf" 25 | internal const val FILE1 = "folder/folder1/file1.txt" 26 | internal const val FONT1 = "folder/folder1/font1.ttf" 27 | internal const val FILE2 = "folder/folder1/folder2/file2.txt" 28 | -------------------------------------------------------------------------------- /gradle/maven.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin : "com.github.dcendents.android-maven" 18 | 19 | group = GROUP 20 | 21 | install.repositories.mavenInstaller { 22 | pom.project { 23 | packaging "aar" 24 | groupId GROUP 25 | artifactId project.name 26 | name project.name 27 | description DESC 28 | url URL 29 | 30 | licenses { 31 | license { 32 | name LICENCE 33 | url LICENCE_URL 34 | } 35 | } 36 | 37 | developers { 38 | developer { 39 | id DEVELOPER 40 | name DEVELOPER 41 | email DEVELOPER_EMAIL 42 | } 43 | } 44 | 45 | scm { 46 | connection SCM 47 | developerConnection SCM_DEV 48 | url URL 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | DEVELOPER=jonathanmerritt 18 | DEVELOPER_EMAIL=11r00tt00r11@gmail.com 19 | 20 | GROUP=com.github.jonathanmerritt.rxassetmanager 21 | DESC=An RxJava2 implementation of the Android AssetManager. 22 | LABELS=android, android-library, asset, assets, assetmanager, assetsmanager, android-asset, android-assets, android-asset-manager, android-assets-manager 23 | LICENCE=Apache-2.0 24 | LICENCE_URL=https://github.com/jonathanmerritt/rxassetmanager/blob/master/LICENSE.txt 25 | 26 | URL=https://github.com/jonathanmerritt/rxassetmanager 27 | SCM=scm:git:git://github.com/jonathanmerritt/rxassetmanager.git 28 | SCM_DEV=scm:git:git@github.com/jonathanmerritt/rxassetmanager.git 29 | 30 | android.enableJetifier=true 31 | android.useAndroidX=true 32 | org.gradle.jvmargs=-Xmx1536m 33 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 35 | 36 | -------------------------------------------------------------------------------- /gradle/bintray.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin : "com.jfrog.bintray" 18 | 19 | version = VERSION.name 20 | 21 | bintray { 22 | user = DEVELOPER 23 | key = PASSKEY.bintray 24 | configurations = ["archives"] 25 | publish = true 26 | 27 | pkg { 28 | repo = GROUP 29 | name = project.name 30 | desc = DESC 31 | websiteUrl = URL 32 | issueTrackerUrl = "$URL/issues" 33 | vcsUrl = SCM 34 | licenses = [LICENCE] 35 | labels = LABELS.split(", ") 36 | publicDownloadNumbers = true 37 | 38 | version { 39 | name = VERSION.name 40 | released = new Date() 41 | desc = "Check - $URL/releases" 42 | vcsTag = VERSION.name 43 | 44 | gpg { 45 | sign = true 46 | passphrase = PASSKEY.gpg 47 | } 48 | 49 | mavenCentralSync { 50 | sync = false 51 | user = DEVELOPER 52 | password = PASSKEY.maven 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /gradle/dokka.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin : "org.jetbrains.dokka-android" 18 | 19 | dokka { 20 | outputFormat = "html" 21 | outputDirectory = "${rootProject.buildDir}/kdoc" 22 | reportUndocumented = false 23 | 24 | externalDocumentationLink { 25 | url = new URL("http://reactivex.io/RxJava/javadoc/") 26 | } 27 | 28 | packageOptions { 29 | prefix = "io.reactivex.android.R" 30 | suppress = true 31 | } 32 | 33 | packageOptions { 34 | prefix = "${GROUP}.core.R" 35 | suppress = true 36 | } 37 | 38 | packageOptions { 39 | prefix = "${GROUP}.core.ext.R" 40 | suppress = true 41 | } 42 | } 43 | 44 | task sourceJar(type : Jar) { 45 | classifier 'sources' 46 | from android.sourceSets.main.java.srcDirs 47 | } 48 | 49 | task dokkaJar(type : Jar) { 50 | group = JavaBasePlugin.DOCUMENTATION_GROUP 51 | description = "Dokka Kdocs" 52 | classifier = "javadoc" 53 | from dokka 54 | } 55 | 56 | artifacts { 57 | archives dokkaJar 58 | archives sourceJar 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 23 | 33 | 36 | 37 | 40 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/MainActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager 18 | 19 | import android.os.Bundle 20 | import androidx.appcompat.app.AppCompatActivity 21 | import androidx.fragment.app.FragmentStatePagerAdapter 22 | import kotlinx.android.synthetic.main.activity_main.pager 23 | import kotlinx.android.synthetic.main.activity_main.tablayout 24 | import kotlinx.android.synthetic.main.activity_main.toolbar 25 | 26 | class MainActivity : AppCompatActivity() { 27 | 28 | override fun onCreate(savedInstanceState: Bundle?) { 29 | super.onCreate(savedInstanceState) 30 | setContentView(R.layout.activity_main) 31 | setSupportActionBar(toolbar) 32 | tablayout.setupWithViewPager(pager.apply { 33 | adapter = object : FragmentStatePagerAdapter(supportFragmentManager) { 34 | val pairs = arrayOf(R.string.core to CoreFragment(), R.string.core_ext to CoreExtFragment()) 35 | override fun getCount() = pairs.size 36 | override fun getPageTitle(position: Int) = getString(pairs[position].first) 37 | override fun getItem(position: Int) = pairs[position].second 38 | } 39 | }) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /core-ext/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/core/ext/Sorting.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager.core.ext 18 | 19 | /** 20 | * Comparator to sort thru file path/name strings. 21 | * 22 | * This class implements a Comparator, and compares file path/name strings based on its type. 23 | */ 24 | sealed class Sorting : Comparator { 25 | override fun compare(f: String?, s: String?) = if (f != null && s != null) when (this) { 26 | is Normal -> 0 27 | is Depth -> compareValuesBy(f, s, { it.length - it.replace("/", "").length }) 28 | } else 0 29 | } 30 | 31 | /** 32 | * Will do nothing, denotes no sorting. 33 | * 34 | * Example: 35 | * --------folder/file.txt 36 | * --------folder/folder1/file.txt 37 | * --------folder/folder1/folder2/file.txt 38 | * --------folder/folder1/folder2/file1.txt 39 | * --------folder/folder1/file1.txt 40 | * --------folder/file1.txt 41 | */ 42 | object Normal : Sorting() 43 | 44 | /** 45 | * Will sort file path/name strings based on their depth in their directories. 46 | * 47 | * Example: 48 | * --------folder/file.txt 49 | * --------folder/file1.txt 50 | * --------folder/folder1/file.txt 51 | * --------folder/folder1/file1.txt 52 | * --------folder/folder1/folder2/file.txt 53 | * --------folder/folder1/folder2/file1.txt 54 | */ 55 | object Depth : Sorting() 56 | -------------------------------------------------------------------------------- /core/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin : "com.android.library" 18 | apply plugin : "kotlin-android" 19 | 20 | android { 21 | compileSdkVersion ANDROID.compile 22 | buildToolsVersion ANDROID.buildTools 23 | 24 | defaultConfig { 25 | minSdkVersion ANDROID.min 26 | targetSdkVersion ANDROID.target 27 | versionCode VERSION.code 28 | versionName VERSION.name 29 | 30 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 31 | } 32 | 33 | buildTypes { 34 | release { 35 | postprocessing { 36 | removeUnusedCode false 37 | removeUnusedResources false 38 | obfuscate false 39 | optimizeCode false 40 | proguardFile "proguard-rules.pro" 41 | } 42 | } 43 | } 44 | 45 | sourceSets { 46 | main.java.srcDirs += "src/main/kotlin" 47 | test.java.srcDirs += "src/test/kotlin" 48 | androidTest.java.srcDirs += "src/androidTest/kotlin" 49 | } 50 | 51 | compileOptions { 52 | sourceCompatibility JavaVersion.VERSION_1_8 53 | targetCompatibility JavaVersion.VERSION_1_8 54 | } 55 | } 56 | 57 | dependencies { 58 | implementation fileTree(dir : "libs", include : ["*.jar"]) 59 | 60 | implementation DEPENDENCY.kotlin 61 | 62 | implementation DEPENDENCY.rxjavas 63 | } 64 | 65 | apply from : "../gradle/dokka.gradle" 66 | apply from : "../gradle/bintray.gradle" 67 | apply from : "../gradle/maven.gradle" 68 | -------------------------------------------------------------------------------- /core-ext/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin : "com.android.library" 18 | apply plugin : "kotlin-android" 19 | 20 | android { 21 | compileSdkVersion ANDROID.compile 22 | buildToolsVersion ANDROID.buildTools 23 | 24 | defaultConfig { 25 | minSdkVersion ANDROID.min 26 | targetSdkVersion ANDROID.target 27 | versionCode VERSION.code 28 | versionName VERSION.name 29 | 30 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 31 | } 32 | 33 | buildTypes { 34 | release { 35 | postprocessing { 36 | removeUnusedCode false 37 | removeUnusedResources false 38 | obfuscate false 39 | optimizeCode false 40 | proguardFile "proguard-rules.pro" 41 | } 42 | } 43 | } 44 | 45 | sourceSets { 46 | main.java.srcDirs += "src/main/kotlin" 47 | test.java.srcDirs += "src/test/kotlin" 48 | androidTest.java.srcDirs += "src/androidTest/kotlin" 49 | } 50 | 51 | compileOptions { 52 | sourceCompatibility JavaVersion.VERSION_1_8 53 | targetCompatibility JavaVersion.VERSION_1_8 54 | } 55 | } 56 | 57 | dependencies { 58 | implementation fileTree(dir : "libs", include : ["*.jar"]) 59 | api project(":core") 60 | 61 | implementation DEPENDENCY.kotlin 62 | 63 | implementation DEPENDENCY.rxjavas 64 | } 65 | 66 | apply from : "../gradle/dokka.gradle" 67 | apply from : "../gradle/bintray.gradle" 68 | apply from : "../gradle/maven.gradle" 69 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin : "com.android.application" 18 | apply plugin : "kotlin-android" 19 | apply plugin : "kotlin-android-extensions" 20 | 21 | android { 22 | compileSdkVersion ANDROID.compile 23 | buildToolsVersion ANDROID.buildTools 24 | 25 | defaultConfig { 26 | minSdkVersion ANDROID.min 27 | targetSdkVersion ANDROID.target 28 | versionCode VERSION.code 29 | versionName VERSION.name 30 | 31 | applicationId GROUP 32 | 33 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 34 | } 35 | 36 | buildTypes { 37 | release { 38 | minifyEnabled false 39 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 40 | } 41 | } 42 | 43 | sourceSets { 44 | main.java.srcDirs += "src/main/kotlin" 45 | test.java.srcDirs += "src/test/kotlin" 46 | androidTest.java.srcDirs += "src/androidTest/kotlin" 47 | } 48 | 49 | compileOptions { 50 | sourceCompatibility JavaVersion.VERSION_1_8 51 | targetCompatibility JavaVersion.VERSION_1_8 52 | } 53 | } 54 | 55 | dependencies { 56 | implementation fileTree(dir : "libs", include : ["*.jar"]) 57 | implementation project(":core-ext") 58 | 59 | implementation DEPENDENCY.appcompat 60 | implementation DEPENDENCY.viewpager 61 | implementation DEPENDENCY.coordinatorlayout 62 | implementation DEPENDENCY.material 63 | implementation DEPENDENCY.constraintlayouts 64 | 65 | implementation DEPENDENCY.kotlin 66 | 67 | implementation DEPENDENCY.rxjavas 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 25 | 26 | 31 | 32 | 39 | 40 | 47 | 48 | 49 | 50 | 56 | 57 | -------------------------------------------------------------------------------- /app/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/CoreFragment.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager 18 | 19 | import com.github.jonathanmerritt.rxassetmanager.extensions.click 20 | import kotlinx.android.synthetic.main.fragment_core.getLocals 21 | import kotlinx.android.synthetic.main.fragment_core.list 22 | import kotlinx.android.synthetic.main.fragment_core.open 23 | import kotlinx.android.synthetic.main.fragment_core.openFd 24 | import kotlinx.android.synthetic.main.fragment_core.openFdPair 25 | import kotlinx.android.synthetic.main.fragment_core.openNonAssetFd 26 | import kotlinx.android.synthetic.main.fragment_core.openNonAssetFdPair 27 | import kotlinx.android.synthetic.main.fragment_core.openPair 28 | import kotlinx.android.synthetic.main.fragment_core.openTypeface 29 | import kotlinx.android.synthetic.main.fragment_core.openTypefacePair 30 | import kotlinx.android.synthetic.main.fragment_core.openXmlResParser 31 | import kotlinx.android.synthetic.main.fragment_core.openXmlResParserPair 32 | 33 | class CoreFragment : RxAssetManagerFragment(R.layout.fragment_core, { 34 | getLocals click { it.getLocales().subscribed() } 35 | 36 | open click { it.open(FILE).subscribed() } 37 | openPair click { it.openPair(FILE).subscribed() } 38 | 39 | openTypeface click { (it openTypeface FONT).subscribed() } 40 | openTypefacePair click { (it openTypefacePair FONT1).subscribed() } 41 | 42 | openFd click { (it openFd FILE1).subscribed() } 43 | openFdPair click { (it openFdPair FILE1).subscribed() } 44 | 45 | list click { it.list().subscribed() } 46 | 47 | openNonAssetFd click { it.openNonAssetFd(path = MANIFEST).subscribed() } 48 | openNonAssetFdPair click { it.openNonAssetFdPair(path = MANIFEST).subscribed() } 49 | 50 | openXmlResParser click { it.openXmlResourceParser(path = MANIFEST).subscribed() } 51 | openXmlResParserPair click { it.openXmlResourceParserPair(path = MANIFEST).subscribed() } 52 | }) 53 | -------------------------------------------------------------------------------- /app/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/RxAssetManagerFragment.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager 18 | 19 | import android.os.Bundle 20 | import android.view.LayoutInflater 21 | import android.view.View 22 | import android.view.ViewGroup 23 | import android.widget.Toast.LENGTH_LONG 24 | import android.widget.Toast.makeText 25 | import androidx.appcompat.app.AlertDialog.Builder 26 | import androidx.fragment.app.Fragment 27 | import com.github.jonathanmerritt.rxassetmanager.core.ext.IsRxAssetManager 28 | import com.github.jonathanmerritt.rxassetmanager.core.ext.RxAssetManager 29 | import io.reactivex.Completable 30 | import io.reactivex.Flowable 31 | import io.reactivex.Maybe 32 | import io.reactivex.Observable.never 33 | import io.reactivex.android.schedulers.AndroidSchedulers.mainThread 34 | import io.reactivex.disposables.CompositeDisposable 35 | import io.reactivex.schedulers.Schedulers.io 36 | 37 | abstract class RxAssetManagerFragment( 38 | private val layout: Int, 39 | private val created: RxAssetManagerFragment.(IsRxAssetManager) -> Unit, 40 | private val disposables: CompositeDisposable = CompositeDisposable()) : Fragment() { 41 | 42 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? = 43 | inflater.inflate(layout, container, false) 44 | 45 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 46 | created(this, RxAssetManager(context!!)) 47 | super.onViewCreated(view, savedInstanceState) 48 | } 49 | 50 | override fun onStop() { 51 | disposables.clear() 52 | super.onStop() 53 | } 54 | 55 | fun T.subscribed() = disposables.add(when (this) { 56 | is Completable -> toObservable() 57 | is Maybe<*> -> toObservable() 58 | is Flowable<*> -> toObservable() 59 | else -> never() 60 | } 61 | .map(Any::toString) 62 | .toList() 63 | .subscribeOn(io()) 64 | .observeOn(mainThread()) 65 | .subscribe( 66 | { Builder(context!!).setItems(it.toTypedArray(), { d, _ -> d.dismiss() }).show() }, 67 | { makeText(context, it.message, LENGTH_LONG).show() } 68 | )) 69 | } 70 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | jdk: oraclejdk8 3 | 4 | #sudo: false 5 | 6 | android: 7 | components: 8 | # Uncomment the lines below if you want to 9 | # use the latest revision of Android SDK Tools 10 | - tools 11 | - platform-tools 12 | - tools 13 | 14 | # The BuildTools version used by your project 15 | - build-tools-27.0.3 16 | 17 | # The SDK version used to compile your project 18 | - android-27 19 | 20 | # Additional components 21 | - extra-google-google_play_services 22 | - extra-google-m2repository 23 | - extra-android-m2repository 24 | # - addon-google_apis-google-19 25 | 26 | # Specify at least one system image, 27 | # if you need to run emulator(s) during your tests 28 | - sys-img-armeabi-v7a-android-22 29 | - sys-img-armeabi-v7a-android-17 30 | 31 | #before_script: 32 | # - echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a 33 | # - emulator -avd test -no-skin -no-audio -no-window & 34 | # - android-wait-for-emulator 35 | # - adb shell input keyevent 82 & 36 | 37 | install: skip 38 | 39 | # env: 40 | # global: 41 | # - CACHE_DIR=$([ $TRAVIS_OS_NAME = 'linux' ] && echo "FOO" || echo "BAR") 42 | 43 | # cache: 44 | # directories: 45 | # - $CACHE_DIR 46 | 47 | # env: 48 | # global: 49 | # - PATH=/usr/local/android-sdk/tools/bin:$PATH 50 | 51 | script: skip 52 | # android: 53 | # components: 54 | # - tools 55 | # - platform-tools 56 | # - tools 57 | 58 | # - android-25 59 | 60 | # - build-tools-25.0.2 61 | # - extra 62 | # - extra-google-m2repository 63 | # - extra-android-m2repository 64 | # - extra-android-support 65 | 66 | # jdk: oraclejdk8 67 | 68 | matrix: 69 | include: 70 | - sudo: false 71 | dist: precise 72 | env: DIST=precise STACK=EC2 73 | # - sudo: required 74 | # dist: precise 75 | # env: DIST=precise STACK=GCE 76 | # - sudo: false 77 | # dist: trusty 78 | # env: DIST=trusty STACK=EC2 79 | # - sudo: required 80 | # dist: trusty 81 | # env: DIST=trusty STACK=GCE 82 | # - sudo: false 83 | # dist: trusty 84 | # group: edge 85 | # env: DIST=trusty STACK=EC2 GROUP=edge 86 | # - sudo: required 87 | # dist: trusty 88 | # group: edge 89 | # env: DIST=trusty STACK=GCE GROUP=edge 90 | # - os: osx 91 | 92 | 93 | notifications: 94 | email: false 95 | 96 | # slack: 97 | # rooms: 98 | # - secure: "KZTfjxhkOdDDZYD2ThBILt2ShYtdEee3PudFZlQBfpxG9N470GfxnKVfOl7Odu4lN6cIupwC4S4BnehubEywSR99l60VmfhePUCTqDLYy+iR9+guTvaECdXdaau3jTKhFdu5u60ITsiw5Yb+hwAaGFO0HmQhqR9XVr/U8IGQlok=" 99 | # template: 100 | # - "Build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>) of %{repository}@%{branch} by %{author} %{result} in %{duration} (elapsed time: %{elapsed_time}) subject: %{commit_subject} message: %{commit_message} foobar" 101 | # on_success: always -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | RxAssetManager 19 | Core 20 | Core-Ext 21 | 22 | Get Locals 23 | Open 24 | Open Pair 25 | Open Typeface 26 | Open Typeface Pair 27 | Open Fd 28 | Open Fd Pair 29 | List 30 | Open Non Asset Fd 31 | Open Non Asset Fd Pair 32 | Open Xml Resource Parser 33 | Open Xml Resource Parser Pair 34 | 35 | Open String 36 | Open String Pair 37 | Open Bytes 38 | Open Bytes Pair 39 | Open And Save 40 | Open And Save Pair 41 | Open Bitmap 42 | Open Bitmap Pair 43 | List All 44 | List And Open 45 | List And Open Pair 46 | List And Open String 47 | List And Open String Pair 48 | List And Open Bytes 49 | List And Open Bytes Pair 50 | List, Open And Save 51 | List, Open And Save Pair 52 | List Open Bitmap 53 | List Open Bitmap Pair 54 | List Open Typeface 55 | List Open Typeface Pair 56 | List And Open Fd 57 | List And Open Fd Pair 58 | List And Open Non Asset Fd 59 | List And Open Non Asset Fd Pair 60 | List And Open Xml Resource Parser 61 | List And Open Xml Resource Parser Pair 62 | 63 | -------------------------------------------------------------------------------- /core/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/core/IsRxAssetManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager.core 18 | 19 | import android.content.res.AssetFileDescriptor 20 | import android.content.res.AssetManager.ACCESS_STREAMING 21 | import android.content.res.XmlResourceParser 22 | import android.graphics.Typeface 23 | import io.reactivex.Completable 24 | import io.reactivex.Completable.complete 25 | import io.reactivex.Flowable 26 | import io.reactivex.Maybe 27 | import io.reactivex.Maybe.empty 28 | import java.io.InputStream 29 | 30 | /** 31 | * Reactive asset manager interface. 32 | * 33 | * This class outlines the main api for the library. 34 | */ 35 | interface IsRxAssetManager { 36 | /** 37 | * Companion object used for default parameter values. 38 | */ 39 | companion object { 40 | /** 41 | * Default access mode = [ACCESS_STREAMING]. 42 | */ 43 | const val MODE = ACCESS_STREAMING 44 | 45 | /** 46 | * Default path = "". 47 | */ 48 | const val PATH = "" 49 | 50 | /** 51 | * Default file cookie = 0. 52 | */ 53 | const val COOKIE = 0 54 | } 55 | 56 | /** 57 | * Defaults to an empty flowable. 58 | */ 59 | fun getLocales(): Flowable = Flowable.empty() 60 | 61 | /** 62 | * Defaults to a complete completable. 63 | */ 64 | fun close(): Completable = complete() 65 | 66 | /** 67 | * Defaults to an empty maybe. 68 | */ 69 | fun open(path: String, mode: Int = MODE): Maybe = empty() 70 | 71 | /** 72 | * Defaults to an empty maybe. 73 | */ 74 | fun openPair(path: String, mode: Int = MODE): Maybe> = empty() 75 | 76 | /** 77 | * Defaults to an empty maybe. 78 | */ 79 | infix fun openTypeface(path: String): Maybe = empty() 80 | 81 | /** 82 | * Defaults to an empty maybe. 83 | */ 84 | infix fun openTypefacePair(path: String): Maybe> = empty() 85 | 86 | /** 87 | * Defaults to an empty maybe. 88 | */ 89 | infix fun openFd(path: String): Maybe = empty() 90 | 91 | /** 92 | * Defaults to an empty maybe. 93 | */ 94 | infix fun openFdPair(path: String): Maybe> = empty() 95 | 96 | /** 97 | * Defaults to an empty flowable. 98 | */ 99 | fun list(path: String = PATH): Flowable = Flowable.empty() 100 | 101 | /** 102 | * Defaults to an empty maybe. 103 | */ 104 | fun openNonAssetFd(cookie: Int = COOKIE, path: String): Maybe = empty() 105 | 106 | /** 107 | * Defaults to an empty maybe. 108 | */ 109 | fun openNonAssetFdPair(cookie: Int = COOKIE, path: String): Maybe> = empty() 110 | 111 | /** 112 | * Defaults to an empty maybe. 113 | */ 114 | fun openXmlResourceParser(cookie: Int = COOKIE, path: String): Maybe = empty() 115 | 116 | /** 117 | * Defaults to an empty maybe. 118 | */ 119 | fun openXmlResourceParserPair(cookie: Int = COOKIE, path: String): Maybe> = 120 | empty() 121 | } 122 | -------------------------------------------------------------------------------- /app/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/CoreExtFragment.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager 18 | 19 | import com.github.jonathanmerritt.rxassetmanager.core.ext.Depth 20 | import com.github.jonathanmerritt.rxassetmanager.extensions.cacheDir 21 | import com.github.jonathanmerritt.rxassetmanager.extensions.click 22 | import kotlinx.android.synthetic.main.fragment_core_ext.listAll 23 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpen 24 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenBitmap 25 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenBitmapPair 26 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenBytes 27 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenBytesPair 28 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenFd 29 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenFdPair 30 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenNonAssetFd 31 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenNonAssetFdPair 32 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenPair 33 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenSave 34 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenSavePair 35 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenString 36 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenStringPair 37 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenTypeface 38 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenTypefacePair 39 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenXmlResourceParser 40 | import kotlinx.android.synthetic.main.fragment_core_ext.listOpenXmlResourceParserPair 41 | import kotlinx.android.synthetic.main.fragment_core_ext.openBitmap 42 | import kotlinx.android.synthetic.main.fragment_core_ext.openBitmapPair 43 | import kotlinx.android.synthetic.main.fragment_core_ext.openBytes 44 | import kotlinx.android.synthetic.main.fragment_core_ext.openBytesPair 45 | import kotlinx.android.synthetic.main.fragment_core_ext.openSave 46 | import kotlinx.android.synthetic.main.fragment_core_ext.openSavePair 47 | import kotlinx.android.synthetic.main.fragment_core_ext.openString 48 | import kotlinx.android.synthetic.main.fragment_core_ext.openStringPair 49 | 50 | class CoreExtFragment : RxAssetManagerFragment(R.layout.fragment_core_ext, { 51 | openString click { it.openString(FILE).subscribed() } 52 | openStringPair click { it.openStringPair(FILE).subscribed() } 53 | 54 | openBytes click { it.openBytes(FILE1).subscribed() } 55 | openBytesPair click { it.openBytesPair(FILE1).subscribed() } 56 | 57 | openSave click { it.openSave(FILE2, to = cacheDir).subscribed() } 58 | openSavePair click { it.openSavePair(FILE2, to = cacheDir).subscribed() } 59 | 60 | openBitmap click { it.openBitmap(ICON).subscribed() } 61 | openBitmapPair click { it.openBitmapPair(ICON).subscribed() } 62 | 63 | listAll click { it.listAll(sorting = Depth).subscribed() } 64 | 65 | listOpen click { it.listOpen(FOLDER, all = true).subscribed() } 66 | listOpenPair click { it.listOpenPair(FOLDER, all = true).subscribed() } 67 | 68 | listOpenString click { it.listOpenString(FOLDER, all = true).subscribed() } 69 | listOpenStringPair click { it.listOpenStringPair(FOLDER, all = true).subscribed() } 70 | 71 | listOpenBytes click { it.listOpenBytes(FOLDER, all = true).subscribed() } 72 | listOpenBytesPair click { it.listOpenBytesPair(FOLDER, all = true).subscribed() } 73 | 74 | listOpenSave click { it.listOpenSave(FOLDER, to = cacheDir, all = true).subscribed() } 75 | listOpenSavePair click { it.listOpenSavePair(FOLDER, to = cacheDir, all = true).subscribed() } 76 | 77 | listOpenBitmap click { it.listOpenBitmap(FOLDER, all = true).subscribed() } 78 | listOpenBitmapPair click { it.listOpenBitmapPair(FOLDER, all = true).subscribed() } 79 | 80 | listOpenTypeface click { it.listOpenTypeface(FOLDER, all = true).subscribed() } 81 | listOpenTypefacePair click { it.listOpenTypefacePair(FOLDER, all = true).subscribed() } 82 | 83 | listOpenFd click { it.listOpenFd(FOLDER, all = true).subscribed() } 84 | listOpenFdPair click { it.listOpenFdPair(FOLDER, all = true).subscribed() } 85 | 86 | listOpenNonAssetFd click { it.listOpenNonAssetFd(path = ROOT).subscribed() } 87 | listOpenNonAssetFdPair click { it.listOpenNonAssetFdPair(path = ROOT).subscribed() } 88 | 89 | listOpenXmlResourceParser click { it.listOpenXmlResourceParser(path = ROOT, all = true).subscribed() } 90 | listOpenXmlResourceParserPair click { it.listOpenXmlResourceParserPair(path = ROOT, all = true).subscribed() } 91 | }) 92 | -------------------------------------------------------------------------------- /core/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/core/RxAssetManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager.core 18 | 19 | import android.content.Context 20 | import android.content.res.AssetFileDescriptor 21 | import android.content.res.AssetManager 22 | import android.content.res.XmlResourceParser 23 | import android.graphics.Typeface 24 | import android.graphics.Typeface.createFromAsset 25 | import io.reactivex.Completable 26 | import io.reactivex.Completable.fromAction 27 | import io.reactivex.Flowable 28 | import io.reactivex.Flowable.fromIterable 29 | import io.reactivex.Maybe 30 | import io.reactivex.Maybe.fromCallable 31 | import java.io.InputStream 32 | 33 | /** 34 | * Reactive asset manager. 35 | * 36 | * This class wraps the android asset manager with rxjava2 types. 37 | * @property manager android asset manager. 38 | * @constructor Creates a RxAssetManager instance. 39 | */ 40 | open class RxAssetManager(private val manager: AssetManager) : IsRxAssetManager { 41 | 42 | /** 43 | * Secondary constructor using a context. 44 | * @property context android context. 45 | * @constructor Creates a RxAssetManager instance. 46 | */ 47 | constructor(context: Context) : this(context.assets) 48 | 49 | /** 50 | * Gets all locales. 51 | * @return a string flowable. 52 | */ 53 | override fun getLocales(): Flowable = fromIterable(manager.locales.asIterable()) 54 | 55 | /** 56 | * Closes the asset manager. 57 | * @return a completable. 58 | */ 59 | override fun close(): Completable = fromAction(manager::close) 60 | 61 | /** 62 | * Opens an asset input stream. 63 | * @param path asset file path. 64 | * @param mode file access mode. 65 | * @return an input stream maybe. 66 | */ 67 | override fun open(path: String, mode: Int): Maybe = fromCallable { manager.open(path, mode) } 68 | 69 | /** 70 | * Opens an asset input stream pair. 71 | * @param path asset file path. 72 | * @param mode file access mode. 73 | * @return a string input stream pair maybe. 74 | */ 75 | override fun openPair(path: String, mode: Int): Maybe> = 76 | fromCallable { path to manager.open(path, mode) } 77 | 78 | /** 79 | * Opens an asset font. 80 | * @param path asset file path. 81 | * @return a typeface maybe. 82 | */ 83 | override infix fun openTypeface(path: String): Maybe = fromCallable { createFromAsset(manager, path) } 84 | 85 | /** 86 | * Opens an asset font pair. 87 | * @param path asset file path. 88 | * @return a string typeface pair maybe. 89 | */ 90 | override infix fun openTypefacePair(path: String): Maybe> = 91 | openTypeface(path).map { path to it } 92 | 93 | /** 94 | * Opens an asset file descriptor. 95 | * @param path asset file path. 96 | * @return an asset file descriptor maybe. 97 | */ 98 | override infix fun openFd(path: String): Maybe = fromCallable { manager.openFd(path) } 99 | 100 | /** 101 | * Opens an asset file descriptor pair. 102 | * @param path asset file path. 103 | * @return a string asset file descriptor pair maybe. 104 | */ 105 | override infix fun openFdPair(path: String): Maybe> = 106 | fromCallable { path to manager.openFd(path) } 107 | 108 | /** 109 | * Lists asset files. 110 | * @param path assets folder path. 111 | * @return a string flowable. 112 | */ 113 | override fun list(path: String): Flowable = fromIterable(manager.list(path).asIterable()) 114 | 115 | /** 116 | * Opens a non asset file. 117 | * @param cookie non asset file cookie. 118 | * @param path non asset file path. 119 | * @return an asset file descriptor maybe. 120 | */ 121 | override fun openNonAssetFd(cookie: Int, path: String): Maybe = 122 | fromCallable { manager.openNonAssetFd(cookie, path) } 123 | 124 | /** 125 | * Opens a non asset file pair. 126 | * @param cookie non asset file cookie. 127 | * @param path non asset file path. 128 | * @return a string asset file descriptor pair maybe. 129 | */ 130 | override fun openNonAssetFdPair(cookie: Int, path: String): Maybe> = 131 | fromCallable { path to manager.openNonAssetFd(cookie, path) } 132 | 133 | /** 134 | * Opens a xml resource parser. 135 | * @param cookie xml file cookie. 136 | * @param path xml file path. 137 | * @return an xml resource parser maybe. 138 | */ 139 | override fun openXmlResourceParser(cookie: Int, path: String): Maybe = 140 | fromCallable { manager.openXmlResourceParser(cookie, path) } 141 | 142 | /** 143 | * Opens a xml resource parser pair. 144 | * @param cookie xml file cookie. 145 | * @param path xml file path. 146 | * @return a string xml resource parser pair maybe. 147 | */ 148 | override fun openXmlResourceParserPair(cookie: Int, path: String): Maybe> = 149 | fromCallable { path to manager.openXmlResourceParser(cookie, path) } 150 | } 151 | -------------------------------------------------------------------------------- /core-ext/src/main/kotlin/com/github/jonathanmerritt/rxassetmanager/core/ext/IsRxAssetManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Jonathan Merritt 11R00TT00R11@GMAIL.COM 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.github.jonathanmerritt.rxassetmanager.core.ext 18 | 19 | import android.content.res.AssetFileDescriptor 20 | import android.content.res.XmlResourceParser 21 | import android.graphics.Bitmap 22 | import android.graphics.Typeface 23 | import com.github.jonathanmerritt.rxassetmanager.core.IsRxAssetManager.Companion.COOKIE 24 | import com.github.jonathanmerritt.rxassetmanager.core.IsRxAssetManager.Companion.MODE 25 | import com.github.jonathanmerritt.rxassetmanager.core.IsRxAssetManager.Companion.PATH 26 | import io.reactivex.Flowable 27 | import io.reactivex.Flowable.empty 28 | import io.reactivex.Maybe 29 | import java.io.File 30 | import java.io.InputStream 31 | import com.github.jonathanmerritt.rxassetmanager.core.IsRxAssetManager as isRxAssetManager 32 | 33 | /** 34 | * Reactive asset manager extended interface. 35 | * 36 | * This class outlines the extended api for the library. 37 | */ 38 | interface IsRxAssetManager : isRxAssetManager { 39 | /** 40 | * Companion object used for default parameter values. 41 | */ 42 | companion object { 43 | /** 44 | * Default list all = false. 45 | */ 46 | const val ALL = false 47 | } 48 | 49 | /** 50 | * Defaults to an empty maybe. 51 | */ 52 | fun openString(path: String, mode: Int = MODE): Maybe = Maybe.empty() 53 | 54 | /** 55 | * Defaults to an empty maybe. 56 | */ 57 | fun openStringPair(path: String, mode: Int = MODE): Maybe> = Maybe.empty() 58 | 59 | /** 60 | * Defaults to an empty maybe. 61 | */ 62 | fun openBytes(path: String, mode: Int = MODE): Maybe = Maybe.empty() 63 | 64 | /** 65 | * Defaults to an empty maybe. 66 | */ 67 | fun openBytesPair(path: String, mode: Int = MODE): Maybe> = Maybe.empty() 68 | 69 | /** 70 | * Defaults to an empty maybe. 71 | */ 72 | fun openSave(path: String, mode: Int = MODE, to: String): Maybe = Maybe.empty() 73 | 74 | /** 75 | * Defaults to an empty maybe. 76 | */ 77 | fun openSavePair(path: String, mode: Int = MODE, to: String): Maybe> = Maybe.empty() 78 | 79 | /** 80 | * Defaults to an empty maybe. 81 | */ 82 | fun openBitmap(path: String, mode: Int = MODE): Maybe = Maybe.empty() 83 | 84 | /** 85 | * Defaults to an empty maybe. 86 | */ 87 | fun openBitmapPair(path: String, mode: Int = MODE): Maybe> = Maybe.empty() 88 | 89 | /** 90 | * Defaults to an empty flowable. 91 | */ 92 | fun listAll(path: String = PATH, sorting: Sorting = Normal): Flowable = empty() 93 | 94 | /** 95 | * Defaults to an empty flowable. 96 | */ 97 | fun listOpen(path: String = PATH, mode: Int = MODE, all: Boolean = ALL): Flowable = 98 | empty() 99 | 100 | /** 101 | * Defaults to an empty flowable. 102 | */ 103 | fun listOpenPair(path: String = PATH, mode: Int = MODE, all: Boolean = ALL): 104 | Flowable> = empty() 105 | 106 | /** 107 | * Defaults to an empty flowable. 108 | */ 109 | fun listOpenString(path: String = PATH, mode: Int = MODE, all: Boolean = ALL): Flowable = empty() 110 | 111 | /** 112 | * Defaults to an empty flowable. 113 | */ 114 | fun listOpenStringPair(path: String = PATH, mode: Int = MODE, all: Boolean = ALL): 115 | Flowable> = empty() 116 | 117 | /** 118 | * Defaults to an empty flowable. 119 | */ 120 | fun listOpenBytes(path: String = PATH, mode: Int = MODE, all: Boolean = ALL): Flowable = empty() 121 | 122 | /** 123 | * Defaults to an empty flowable. 124 | */ 125 | fun listOpenBytesPair(path: String = PATH, mode: Int = MODE, all: Boolean = ALL): 126 | Flowable> = empty() 127 | 128 | /** 129 | * Defaults to an empty flowable. 130 | */ 131 | fun listOpenSave(path: String = PATH, mode: Int = MODE, to: String, all: Boolean = ALL): Flowable = empty() 132 | 133 | /** 134 | * Defaults to an empty flowable. 135 | */ 136 | fun listOpenSavePair(path: String = PATH, mode: Int = MODE, to: String, all: Boolean = ALL): 137 | Flowable> = empty() 138 | 139 | /** 140 | * Defaults to an empty flowable. 141 | */ 142 | fun listOpenBitmap(path: String = PATH, mode: Int = MODE, all: Boolean = ALL): Flowable = empty() 143 | 144 | /** 145 | * Defaults to an empty flowable. 146 | */ 147 | fun listOpenBitmapPair(path: String = PATH, mode: Int = MODE, all: Boolean = ALL): 148 | Flowable> = empty() 149 | 150 | /** 151 | * Defaults to an empty flowable. 152 | */ 153 | fun listOpenTypeface(path: String = PATH, all: Boolean = ALL): Flowable = empty() 154 | 155 | /** 156 | * Defaults to an empty flowable. 157 | */ 158 | fun listOpenTypefacePair(path: String = PATH, all: Boolean = ALL): Flowable> = empty() 159 | 160 | /** 161 | * Defaults to an empty flowable. 162 | */ 163 | fun listOpenFd(path: String = PATH, all: Boolean = ALL): Flowable = empty() 164 | 165 | /** 166 | * Defaults to an empty flowable. 167 | */ 168 | fun listOpenFdPair(path: String = PATH, all: Boolean = ALL): Flowable> = 169 | empty() 170 | 171 | /** 172 | * Defaults to an empty flowable. 173 | */ 174 | fun listOpenNonAssetFd(cookie: Int = COOKIE, path: String = PATH, 175 | all: Boolean = ALL): Flowable = empty() 176 | 177 | /** 178 | * Defaults to an empty flowable. 179 | */ 180 | fun listOpenNonAssetFdPair(cookie: Int = COOKIE, path: String = PATH, all: Boolean = ALL): 181 | Flowable> = empty() 182 | 183 | /** 184 | * Defaults to an empty flowable. 185 | */ 186 | fun listOpenXmlResourceParser(cookie: Int = COOKIE, path: String = PATH, all: Boolean = ALL): 187 | Flowable = empty() 188 | 189 | /** 190 | * Defaults to an empty flowable. 191 | */ 192 | fun listOpenXmlResourceParserPair(cookie: Int = COOKIE, path: String = PATH, all: Boolean = ALL): 193 | Flowable> = empty() 194 | } 195 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_core.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 24 | 25 | 29 | 30 |