Update icons to be adaptive

This commit is contained in:
Sean Mac Gillicuddy 2019-11-18 10:26:31 +00:00
parent 8057ef6b6e
commit 80b26132fe
95 changed files with 171 additions and 233 deletions

View File

@ -2,7 +2,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.kiwix.kiwixmobile"> package="org.kiwix.kiwixmobile">
<application android:name=".KiwixApp"> <application
android:name=".KiwixApp"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round">
<activity <activity
android:name=".main.KiwixMainActivity" android:name=".main.KiwixMainActivity"
android:configChanges="orientation|keyboardHidden|screenSize|locale" android:configChanges="orientation|keyboardHidden|screenSize|locale"

View File

@ -19,7 +19,7 @@
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:minHeight="?android:attr/listPreferredItemHeight" android:minHeight="?android:attr/listPreferredItemHeight"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:src="@mipmap/kiwix_icon" /> android:src="@mipmap/ic_launcher" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"

View File

@ -20,7 +20,7 @@
android:layout_marginRight="@dimen/favicon_margin_right" android:layout_marginRight="@dimen/favicon_margin_right"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:src="@mipmap/kiwix_icon" android:src="@mipmap/ic_launcher"
/> />
<LinearLayout <LinearLayout

View File

@ -0,0 +1,73 @@
/*
* Kiwix Android
* Copyright (c) 2019 Kiwix <android.kiwix.org>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package custom
import com.android.build.gradle.internal.dsl.ProductFlavor
import custom.CustomApps.CustomApp
import org.gradle.api.NamedDomainObjectContainer
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
object CustomApps {
val all = listOf(
CustomApp(
name = "customexample",
versionName = "2017-07",
url = "http://download.kiwix.org/zim/wikipedia_fr_test.zim",
enforcedLanguage = "en",
displayName = "Test Custom App"
),
CustomApp(
name = "wikimed",
versionName = "2018-08",
url = "http://download.kiwix.org/zim/wikipedia_en_medicine_novid.zim",
enforcedLanguage = "en",
displayName = "Medical Wikipedia"
)
)
data class CustomApp(
val name: String,
val versionName: String,
val versionCode: Int = Date().let {
SimpleDateFormat("YYDDD0", Locale.ROOT).format(it).toInt()
},
val url: String,
val enforcedLanguage: String,
val displayName: String
)
}
fun NamedDomainObjectContainer<ProductFlavor>.create(customApps: List<CustomApp>) {
customApps.forEach { customFlavor ->
create(customFlavor.name) {
versionName = customFlavor.versionName
versionCode = customFlavor.versionCode
applicationIdSuffix = ".kiwixcustom${customFlavor.name}"
buildConfigField("String", "ZIM_URL", "\"${customFlavor.url}\"")
buildConfigField("String", "ENFORCED_LANG", "\"${customFlavor.enforcedLanguage}\"")
configureStrings(customFlavor.displayName)
}
}
}
fun ProductFlavor.configureStrings(appName: String) {
resValue("string", "app_name", appName)
resValue("string", "app_search_string", "Search $appName")
}

View File

@ -19,9 +19,7 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:icon="@mipmap/kiwix_icon"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/kiwix_icon_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -607,7 +607,7 @@ public abstract class CoreMainActivity extends BaseActivity implements WebViewCa
tempVisitCount = 0; tempVisitCount = 0;
visitCounterPref.setCount(tempVisitCount); visitCounterPref.setCount(tempVisitCount);
}) })
.setIcon(ContextCompat.getDrawable(this, R.mipmap.kiwix_icon)) .setIcon(ContextCompat.getDrawable(this, R.mipmap.ic_launcher))
.show(); .show();
} }

View File

@ -76,7 +76,7 @@ public class HotspotNotificationManager {
.setContentTitle(context.getString(R.string.hotspot_notification_content_title)) .setContentTitle(context.getString(R.string.hotspot_notification_content_title))
.setContentText(context.getString(R.string.hotspot_running)) .setContentText(context.getString(R.string.hotspot_running))
.setContentIntent(contentIntent) .setContentIntent(contentIntent)
.setSmallIcon(R.mipmap.kiwix_icon) .setSmallIcon(R.mipmap.ic_launcher)
.setWhen(System.currentTimeMillis()) .setWhen(System.currentTimeMillis())
.addAction(R.drawable.ic_close_white_24dp, .addAction(R.drawable.ic_close_white_24dp,
context.getString(R.string.stop_hotspot_button), context.getString(R.string.stop_hotspot_button),

View File

@ -84,7 +84,7 @@
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" app:layout_constraintTop_toBottomOf="@+id/textView2"
app:srcCompat="@mipmap/kiwix_icon" app:srcCompat="@mipmap/ic_launcher"
/> />
<ScrollView <ScrollView

View File

@ -41,7 +41,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/itemBookCheckbox" app:layout_constraintStart_toEndOf="@id/itemBookCheckbox"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:src="@mipmap/kiwix_icon_round" /> tools:src="@mipmap/ic_launcher_round" />
<TextView <TextView
android:id="@+id/item_book_title" android:id="@+id/item_book_title"

View File

@ -19,7 +19,7 @@
app:layout_constraintEnd_toStartOf="@id/title" app:layout_constraintEnd_toStartOf="@id/title"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:src="@mipmap/kiwix_icon_round" tools:src="@mipmap/ic_launcher_round"
/> />
<TextView <TextView

View File

@ -16,7 +16,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.1" android:layout_weight="0.1"
android:src="@drawable/ic_kiwix_widget" android:src="@mipmap/ic_launcher"
/> />
<TextView <TextView

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

View File

@ -1,13 +1,13 @@
import com.android.build.gradle.api.ApkVariantOutput import com.android.build.gradle.api.ApkVariantOutput
import com.android.build.gradle.api.ApplicationVariant import com.android.build.gradle.api.ApplicationVariant
import com.android.build.gradle.internal.dsl.ProductFlavor import com.android.build.gradle.internal.dsl.ProductFlavor
import custom.CustomApps
import custom.create
import custom.createPublisher import custom.createPublisher
import custom.transactionWithCommit import custom.transactionWithCommit
import plugin.KiwixConfigurationPlugin import plugin.KiwixConfigurationPlugin
import java.net.URI import java.net.URI
import java.net.URL import java.net.URL
import java.text.SimpleDateFormat
import java.util.Date
plugins { plugins {
android android
@ -22,26 +22,13 @@ android {
flavorDimensions("default") flavorDimensions("default")
productFlavors { productFlavors {
create( create(CustomApps.all)
CustomFlavor(
flavorName = "customexample",
versionName = "2017-07",
url = "http://download.kiwix.org/zim/wikipedia_fr_test.zim",
enforcedLanguage = "en",
appName = "Test Custom App"
),
CustomFlavor(
flavorName = "wikimed",
versionName = "2018-08",
url = "http://download.kiwix.org/zim/wikipedia_en_medicine_novid.zim",
enforcedLanguage = "en",
appName = "Medical Wikipedia"
)
)
all { all {
val zimFile = File("$projectDir/src", "$name/$name.zim") File("$projectDir/src", "$name/$name.zim").let {
createDownloadTask(zimFile) createDownloadTask(it)
createPublishApkWithExpansionTask(name, zimFile, applicationVariants) createPublishApkWithExpansionTask(it, applicationVariants)
}
} }
} }
splits { splits {
@ -49,50 +36,10 @@ android {
isUniversalApk = false isUniversalApk = false
} }
} }
} lintOptions {
ignore("IconLocation")
// apply(from = File("dynamic_flavors.gradle"))
fun ProductFlavor.configureStrings(appName: String) {
resValue("string", "app_name", appName)
resValue("string", "app_search_string", "Search $appName")
}
fun ProductFlavor.fetchUrl(): String {
val urlConnection =
URI.create(buildConfigFields["ZIM_URL"]!!.value.replace("\"", "")).toURL()
.openConnection()
urlConnection.connect()
urlConnection.getInputStream()
return urlConnection
.getHeaderField("Location")
?.replace("https", "http")
?: urlConnection.url.toString()
}
fun NamedDomainObjectContainer<ProductFlavor>.create(vararg customFlavors: CustomFlavor) {
customFlavors.forEach { customFlavor ->
create(customFlavor.flavorName) {
versionName = customFlavor.versionName
versionCode = customFlavor.versionCode
applicationIdSuffix = ".kiwixcustom${customFlavor.flavorName}"
buildConfigField("String", "ZIM_URL", "\"${customFlavor.url}\"")
buildConfigField("String", "ENFORCED_LANG", "\"${customFlavor.enforcedLanguage}\"")
configureStrings(customFlavor.appName)
} }
} }
}
data class CustomFlavor(
val flavorName: String,
val versionName: String,
val versionCode: Int = Date().let {
SimpleDateFormat("YYDDD0").format(it).toInt()
},
val url: String,
val enforcedLanguage: String,
val appName: String
)
fun ProductFlavor.createDownloadTask(file: File): Task { fun ProductFlavor.createDownloadTask(file: File): Task {
return tasks.create("download${name.capitalize()}Zim") { return tasks.create("download${name.capitalize()}Zim") {
@ -108,30 +55,45 @@ fun ProductFlavor.createDownloadTask(file: File): Task {
} }
} }
fun ProductFlavor.fetchUrl(): String {
return URI.create(buildConfigFields["ZIM_URL"]!!.value.replace("\"", "")).toURL()
.openConnection()
.apply {
connect()
getInputStream()
}.let {
it.getHeaderField("Location")?.replace("https", "http") ?: it.url.toString()
}
}
fun ProductFlavor.createPublishApkWithExpansionTask( fun ProductFlavor.createPublishApkWithExpansionTask(
flavorName: String,
file: File, file: File,
applicationVariants: DomainObjectSet<ApplicationVariant> applicationVariants: DomainObjectSet<ApplicationVariant>
): Task { ): Task {
return tasks.create("publish${flavorName.capitalize()}ReleaseApkWithExpansionFile") { val capitalizedName = name.capitalize()
return tasks.create("publish${capitalizedName}ReleaseApkWithExpansionFile") {
group = "publishing" group = "publishing"
description = "Uploads ${flavorName.capitalize()} to the Play Console with an Expansion file" description = "Uploads $capitalizedName to the Play Console with an Expansion file"
doLast { doLast {
val packageName = "org.kiwix$applicationIdSuffix" val packageName = "org.kiwix$applicationIdSuffix"
println("packageName $packageName") println("packageName $packageName")
val apkVariants = getApkVariants(applicationVariants, flavorName)
createPublisher(File(rootDir, "google.json")) createPublisher(File(rootDir, "google.json"))
.transactionWithCommit(packageName) { .transactionWithCommit(packageName) {
apkVariants.forEach(::uploadApk) val variants =
uploadExpansionTo(file, apkVariants[0]) applicationVariants.releaseVariantsFor(this@createPublishApkWithExpansionTask)
apkVariants.drop(1).forEach { variants.forEach(::uploadApk)
attachExpansionTo(apkVariants[0].versionCodeOverride, it) uploadExpansionTo(file, variants[0])
} variants.drop(1).forEach { attachExpansionTo(variants[0].versionCodeOverride, it) }
addToTrackInDraft(apkVariants) addToTrackInDraft(variants)
} }
} }
} }
} }
fun DomainObjectSet<ApplicationVariant>.releaseVariantsFor(productFlavor: ProductFlavor) =
find { it.name.equals("${productFlavor.name}Release", true) }!!
.outputs.filterIsInstance<ApkVariantOutput>().sortedBy { it.versionCodeOverride }
afterEvaluate { afterEvaluate {
tasks.filter { it.name.contains("ReleaseApkWithExpansionFile") }.forEach { tasks.filter { it.name.contains("ReleaseApkWithExpansionFile") }.forEach {
val flavorName = val flavorName =
@ -140,8 +102,3 @@ afterEvaluate {
it.dependsOn.add(tasks.getByName("assemble${flavorName}Release")) it.dependsOn.add(tasks.getByName("assemble${flavorName}Release"))
} }
} }
fun getApkVariants(applicationVariants: DomainObjectSet<ApplicationVariant>, flavorName: String) =
applicationVariants.find {
it.name.contains("release", true) && it.name.contains(flavorName, true)
}!!.outputs.filterIsInstance<ApkVariantOutput>().sortedBy { it.versionCodeOverride }

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 3.5.0" client="gradle" variant="all" version="3.5.0"> <issues format="5" by="lint 3.5.2" client="gradle" variant="all" version="3.5.2">
<issue <issue
id="ObsoleteLintCustomCheck" id="ObsoleteLintCustomCheck"
@ -11,7 +11,7 @@
<issue <issue
id="AllowBackup" id="AllowBackup"
message="On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute `android:fullBackupContent` to specify an `@xml` resource which configures which files to backup. More info: https://developer.android.com/training/backup/autosyncapi.html" message="On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute `android:fullBackupContent` to specify an `@xml` resource which configures which files to backup. More info: https://developer.android.com/training/backup/autosyncapi.html"
errorLine1=" &lt;application android:name=&quot;.CustomApp&quot;>" errorLine1=" &lt;application"
errorLine2=" ~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~">
<location <location
file="src\main\AndroidManifest.xml" file="src\main\AndroidManifest.xml"
@ -22,7 +22,7 @@
<issue <issue
id="UnpackedNativeCode" id="UnpackedNativeCode"
message="Missing attribute android:extractNativeLibs=&quot;false&quot; on the `&lt;application>` tag." message="Missing attribute android:extractNativeLibs=&quot;false&quot; on the `&lt;application>` tag."
errorLine1=" &lt;application android:name=&quot;.CustomApp&quot;>" errorLine1=" &lt;application"
errorLine2=" ^"> errorLine2=" ^">
<location <location
file="src\main\AndroidManifest.xml" file="src\main\AndroidManifest.xml"
@ -30,134 +30,11 @@
column="3"/> column="3"/>
</issue> </issue>
<issue
id="UnusedResources"
message="The resource `R.drawable.ic_kiwix_widget` appears to be unused">
<location
file="src\customexample\res\drawable-hdpi\ic_kiwix_widget.png"/>
<location
file="src\customexample\res\drawable-mdpi\ic_kiwix_widget.png"/>
<location
file="src\customexample\res\drawable-xhdpi\ic_kiwix_widget.png"/>
<location
file="src\customexample\res\drawable-xxhdpi\ic_kiwix_widget.png"/>
<location
file="src\customexample\res\drawable-xxxhdpi\ic_kiwix_widget.png"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.mipmap.kiwix_icon` appears to be unused">
<location
file="src\customexample\res\mipmap-hdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\mipmap-mdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\mipmap-xhdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\mipmap-xxhdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\mipmap-xxxhdpi\kiwix_icon.png"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.string.customapp_missing_content` appears to be unused"
errorLine1=" &lt;string name=&quot;customapp_missing_content&quot;>Ray Charles&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src\customexample\res\values\strings.xml"
line="3"
column="11"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.raw.wikipedia_fr_test_2017_07` appears to be unused">
<location
file="src\customexample\res\raw\wikipedia_fr_test_2017_07.zim"/>
</issue>
<issue
id="IconDipSize"
message="The image `ic_kiwix_widget.png` varies significantly in its density-independent (dip) size across the various density versions: drawable-hdpi\\ic_kiwix_widget.png: 48x48 dp (72x72 px), drawable-mdpi\\ic_kiwix_widget.png: 72x72 dp (72x72 px), drawable-xhdpi\\ic_kiwix_widget.png: 48x48 dp (96x96 px), drawable-xxhdpi\\ic_kiwix_widget.png: 48x48 dp (144x144 px), drawable-xxxhdpi\\ic_kiwix_widget.png: 48x48 dp (192x192 px)">
<location
file="src\customexample\res\drawable-hdpi\ic_kiwix_widget.png"/>
<location
file="src\customexample\res\drawable-xhdpi\ic_kiwix_widget.png"/>
<location
file="src\customexample\res\drawable-xxxhdpi\ic_kiwix_widget.png"/>
<location
file="src\customexample\res\drawable-xxhdpi\ic_kiwix_widget.png"/>
<location
file="src\customexample\res\drawable-mdpi\ic_kiwix_widget.png"/>
</issue>
<issue
id="IconDipSize"
message="The image `kiwix_icon.png` varies significantly in its density-independent (dip) size across the various density versions: mipmap-hdpi\\kiwix_icon.png: 48x48 dp (72x72 px), mipmap-mdpi\\kiwix_icon.png: 72x72 dp (72x72 px), mipmap-xhdpi\\kiwix_icon.png: 48x48 dp (96x96 px), mipmap-xxhdpi\\kiwix_icon.png: 48x48 dp (144x144 px), mipmap-xxxhdpi\\kiwix_icon.png: 48x48 dp (192x192 px)">
<location
file="src\customexample\res\mipmap-xxhdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\mipmap-xhdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\mipmap-xxxhdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\mipmap-hdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\mipmap-mdpi\kiwix_icon.png"/>
</issue>
<issue <issue
id="IconLocation" id="IconLocation"
message="Found bitmap drawable `res/drawable/kiwix_icon_with_title.png` in densityless folder"> message="Found bitmap drawable `res/drawable/kiwix_icon_with_title.png` in densityless folder">
<location <location
file="src\customexample\res\drawable\kiwix_icon_with_title.png"/> file="src\wikimed\res\drawable\kiwix_icon_with_title.png"/>
</issue>
<issue
id="IconDuplicates"
message="The following unrelated icon files have identical contents: ic_kiwix_widget.png, kiwix_icon.png">
<location
file="src\customexample\res\mipmap-hdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\drawable-hdpi\ic_kiwix_widget.png"/>
</issue>
<issue
id="IconDuplicates"
message="The following unrelated icon files have identical contents: ic_kiwix_widget.png, kiwix_icon.png">
<location
file="src\customexample\res\mipmap-mdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\drawable-mdpi\ic_kiwix_widget.png"/>
</issue>
<issue
id="IconDuplicates"
message="The following unrelated icon files have identical contents: ic_kiwix_widget.png, kiwix_icon.png">
<location
file="src\customexample\res\mipmap-xhdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\drawable-xhdpi\ic_kiwix_widget.png"/>
</issue>
<issue
id="IconDuplicates"
message="The following unrelated icon files have identical contents: ic_kiwix_widget.png, kiwix_icon.png">
<location
file="src\customexample\res\mipmap-xxhdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\drawable-xxhdpi\ic_kiwix_widget.png"/>
</issue>
<issue
id="IconDuplicates"
message="The following unrelated icon files have identical contents: ic_kiwix_widget.png, kiwix_icon.png">
<location
file="src\customexample\res\mipmap-xxxhdpi\kiwix_icon.png"/>
<location
file="src\customexample\res\drawable-xxxhdpi\ic_kiwix_widget.png"/>
</issue> </issue>
<issue <issue
@ -200,7 +77,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location <location
file="src\main\java\org\kiwix\kiwixmobile\custom\main\CustomMainActivity.kt" file="src\main\java\org\kiwix\kiwixmobile\custom\main\CustomMainActivity.kt"
line="41" line="38"
column="7"/> column="7"/>
</issue> </issue>

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -1,11 +0,0 @@
{
"app_name": "Test Custom App",
"package": "org.kiwix.kiwixcustomexample",
"version_name": "2017-07",
"version_code": "1",
"zim_file": "kiwix.granbluefantasy_en_all_all.zim",
"zim_url": "http://download.kiwix.org/zim/other/granbluefantasy_en_all_nopic_2018-10.zim.meta4",
"embed_zim": false,
"ic_launcher": "icon.png",
"enforced_lang": "en"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="customapp_missing_content">Ray Charles</string>
</resources>

View File

@ -3,7 +3,10 @@
package="org.kiwix.kiwixmobile.custom"> package="org.kiwix.kiwixmobile.custom">
<application android:name=".CustomApp"> <application
android:name=".CustomApp"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round">
<activity <activity
android:name=".main.CustomMainActivity" android:name=".main.CustomMainActivity"

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>