diff --git a/app/build.gradle b/app/build.gradle
index 684b2fb42b..6e423385ea 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -224,3 +224,38 @@ buildscript {
repositories {
mavenCentral()
}
+
+// add support for placeholders in resource files
+//https://code.google.com/p/android/issues/detail?id=69224
+def replacePlaceholdersInFile(basePath, fileName, placeholders) {
+ def file = new File(basePath, fileName);
+
+ if (!file.exists()) {
+ logger.quiet("Unable to replace placeholders in " + file.toString() + ". File cannot be found.")
+ return;
+ }
+
+ logger.debug("Replacing placeholders in " + file.toString())
+ logger.debug("Placeholders: " + placeholders.toString())
+
+ def content = file.getText('UTF-8')
+
+ placeholders.each { entry ->
+ content = content.replaceAll("\\\$\\{${entry.key}\\}", entry.value)
+ }
+
+ file.write(content, 'UTF-8')
+}
+
+afterEvaluate {
+ android.applicationVariants.all { variant ->
+ variant.outputs.each { output ->
+ output.processResources.doFirst {
+ // prepare placeholder map from manifestPlaceholders including applicationId placeholder
+ def placeholders = variant.mergedFlavor.manifestPlaceholders + [applicationId: variant.applicationId]
+
+ replacePlaceholdersInFile(resDir, 'xml-v25/shortcuts.xml', placeholders)
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a1c830a087..21627600d8 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -19,6 +19,7 @@
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
+ android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/Theme.Tachiyomi">
@@ -28,6 +29,8 @@
+
setSelectedDrawerItem(R.id.nav_drawer_library)
+ SHORTCUT_RECENTLY_UPDATED -> setSelectedDrawerItem(R.id.nav_drawer_recent_updates)
+ SHORTCUT_RECENTLY_READ -> setSelectedDrawerItem(R.id.nav_drawer_recently_read)
+ SHORTCUT_CATALOGUES -> setSelectedDrawerItem(R.id.nav_drawer_catalogues)
+ else -> setSelectedDrawerItem(startScreenId)
+ }
// Show changelog if needed
ChangelogDialogFragment.show(this, preferences, supportFragmentManager)
}
+
+
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
@@ -143,5 +151,10 @@ class MainActivity : BaseActivity() {
companion object {
private const val REQUEST_OPEN_SETTINGS = 200
+ // Shortcut actions
+ private const val SHORTCUT_LIBRARY = "eu.kanade.tachiyomi.SHOW_LIBRARY"
+ private const val SHORTCUT_RECENTLY_UPDATED = "eu.kanade.tachiyomi.SHOW_RECENTLY_UPDATED"
+ private const val SHORTCUT_RECENTLY_READ = "eu.kanade.tachiyomi.RECENTLY_READ"
+ private const val SHORTCUT_CATALOGUES = "eu.kanade.tachiyomi.SHOW_CATALOGUES"
}
}
diff --git a/app/src/main/res/drawable-hdpi/application_logo_144dp.png b/app/src/main/res/drawable-hdpi/application_logo_144dp.png
deleted file mode 100644
index 87f8ef0814..0000000000
Binary files a/app/src/main/res/drawable-hdpi/application_logo_144dp.png and /dev/null differ
diff --git a/app/src/main/res/drawable-hdpi/tachiyomi_circle.png b/app/src/main/res/drawable-hdpi/tachiyomi_circle.png
new file mode 100644
index 0000000000..e5f3ce7941
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/tachiyomi_circle.png differ
diff --git a/app/src/main/res/drawable-mdpi/application_logo_144dp.png b/app/src/main/res/drawable-mdpi/application_logo_144dp.png
deleted file mode 100644
index d40042f0bd..0000000000
Binary files a/app/src/main/res/drawable-mdpi/application_logo_144dp.png and /dev/null differ
diff --git a/app/src/main/res/drawable-mdpi/tachiyomi_circle.png b/app/src/main/res/drawable-mdpi/tachiyomi_circle.png
new file mode 100644
index 0000000000..94cf3a1d6b
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/tachiyomi_circle.png differ
diff --git a/app/src/main/res/drawable-xhdpi/application_logo_144dp.png b/app/src/main/res/drawable-xhdpi/application_logo_144dp.png
deleted file mode 100644
index 4e32de55e3..0000000000
Binary files a/app/src/main/res/drawable-xhdpi/application_logo_144dp.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xhdpi/tachiyomi_circle.png b/app/src/main/res/drawable-xhdpi/tachiyomi_circle.png
new file mode 100644
index 0000000000..3b62c92b36
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/tachiyomi_circle.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/application_logo_144dp.png b/app/src/main/res/drawable-xxhdpi/application_logo_144dp.png
deleted file mode 100644
index b3aa86fb40..0000000000
Binary files a/app/src/main/res/drawable-xxhdpi/application_logo_144dp.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxhdpi/tachiyomi_circle.png b/app/src/main/res/drawable-xxhdpi/tachiyomi_circle.png
new file mode 100644
index 0000000000..dd8cad897a
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/tachiyomi_circle.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/application_logo_144dp.png b/app/src/main/res/drawable-xxxhdpi/application_logo_144dp.png
deleted file mode 100644
index 212a2fbe9c..0000000000
Binary files a/app/src/main/res/drawable-xxxhdpi/application_logo_144dp.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxxhdpi/tachiyomi_circle.png b/app/src/main/res/drawable-xxxhdpi/tachiyomi_circle.png
new file mode 100644
index 0000000000..1c1b2d8cc6
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/tachiyomi_circle.png differ
diff --git a/app/src/main/res/drawable/branded_logo.xml b/app/src/main/res/drawable/branded_logo.xml
index 1fc2ba120a..3d0d69d42b 100644
--- a/app/src/main/res/drawable/branded_logo.xml
+++ b/app/src/main/res/drawable/branded_logo.xml
@@ -1,10 +1,10 @@
-
+
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/branded_logo_icon.png b/app/src/main/res/drawable/branded_logo_icon.png
new file mode 100644
index 0000000000..ddcebeafa5
Binary files /dev/null and b/app/src/main/res/drawable/branded_logo_icon.png differ
diff --git a/app/src/main/res/drawable/icon.png b/app/src/main/res/drawable/icon.png
deleted file mode 100644
index b577e1c28b..0000000000
Binary files a/app/src/main/res/drawable/icon.png and /dev/null differ
diff --git a/app/src/main/res/drawable/sc_book_48dp.xml b/app/src/main/res/drawable/sc_book_48dp.xml
new file mode 100644
index 0000000000..35c7a7c2ff
--- /dev/null
+++ b/app/src/main/res/drawable/sc_book_48dp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/sc_explore_48dp.xml b/app/src/main/res/drawable/sc_explore_48dp.xml
new file mode 100644
index 0000000000..1489806c88
--- /dev/null
+++ b/app/src/main/res/drawable/sc_explore_48dp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/sc_glasses_48dp.xml b/app/src/main/res/drawable/sc_glasses_48dp.xml
new file mode 100644
index 0000000000..9fa1b0e15a
--- /dev/null
+++ b/app/src/main/res/drawable/sc_glasses_48dp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/sc_update_48dp.xml b/app/src/main/res/drawable/sc_update_48dp.xml
new file mode 100644
index 0000000000..3e6ba0cb97
--- /dev/null
+++ b/app/src/main/res/drawable/sc_update_48dp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/navigation_header.xml b/app/src/main/res/layout/navigation_header.xml
index c658d22b5a..fb62144d77 100644
--- a/app/src/main/res/layout/navigation_header.xml
+++ b/app/src/main/res/layout/navigation_header.xml
@@ -17,6 +17,6 @@
android:layout_marginLeft="16dp"
android:layout_marginTop="@dimen/navigation_drawer_header_margin"
android:scaleType="centerCrop"
- android:src="@drawable/icon"/>
+ android:src="@drawable/tachiyomi_circle"/>
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000000..e5f3ce7941
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000000..94cf3a1d6b
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000000..3b62c92b36
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000000..dd8cad897a
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000000..1c1b2d8cc6
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c54758889e..c85030d1dc 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -89,6 +89,10 @@
Deleting…
Loading…
+
+ Application not available
+ Updates
+
General
diff --git a/app/src/main/res/xml-v25/shortcuts.xml b/app/src/main/res/xml-v25/shortcuts.xml
new file mode 100644
index 0000000000..574f1d5e1e
--- /dev/null
+++ b/app/src/main/res/xml-v25/shortcuts.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+