diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
index eea2358b2..e6f67e903 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
@@ -1,7 +1,6 @@
package eu.kanade.tachiyomi.ui.main
import android.content.Intent
-import android.os.Build
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.view.GravityCompat
@@ -14,8 +13,6 @@ import eu.kanade.tachiyomi.ui.download.DownloadFragment
import eu.kanade.tachiyomi.ui.library.LibraryFragment
import eu.kanade.tachiyomi.ui.recent.RecentChaptersFragment
import eu.kanade.tachiyomi.ui.setting.SettingsActivity
-import eu.kanade.tachiyomi.util.getResourceColor
-import eu.kanade.tachiyomi.util.setVectorCompat
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.toolbar.*
@@ -31,22 +28,17 @@ class MainActivity : BaseActivity() {
return
}
- // Inflate activity_edit_categories.xml.
+ // Inflate activity_main.xml.
setContentView(R.layout.activity_main)
// Handle Toolbar
setupToolbar(toolbar, backNavigation = false)
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp)
- if (Build.VERSION.SDK_INT >= 21) {
- window.statusBarColor = android.R.color.transparent
- }
-
// Set behavior of Navigation drawer
nav_view.setNavigationItemSelectedListener { item ->
// Make information view invisible
- image_view.setImageResource(android.R.color.transparent)
- text_label.text = ""
+ empty_view.hide()
when (item.itemId) {
R.id.nav_drawer_library -> setFragment(LibraryFragment.newInstance())
@@ -91,12 +83,6 @@ class MainActivity : BaseActivity() {
}
fun updateEmptyView(show: Boolean, textResource: Int, drawable: Int) {
- if (show) {
- image_view.setVectorCompat(drawable, theme.getResourceColor(android.R.attr.textColorHint))
- text_label.text = getString(textResource)
- } else {
- image_view.setImageResource(android.R.color.transparent)
- text_label.text = ""
- }
+ if (show) empty_view.show(drawable, textResource) else empty_view.hide()
}
}
\ No newline at end of file
diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt
new file mode 100644
index 000000000..0a3e8eb23
--- /dev/null
+++ b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt
@@ -0,0 +1,36 @@
+package eu.kanade.tachiyomi.widget
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.View
+import android.widget.RelativeLayout
+import eu.kanade.tachiyomi.R
+import eu.kanade.tachiyomi.util.getResourceColor
+import eu.kanade.tachiyomi.util.setVectorCompat
+import kotlinx.android.synthetic.main.view_empty.view.*
+
+class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
+ RelativeLayout (context, attrs) {
+
+ init {
+ inflate(context, R.layout.view_empty, this)
+ }
+
+ /**
+ * Hide the information view
+ */
+ fun hide() {
+ this.visibility = View.GONE
+ }
+
+ /**
+ * Show the information view
+ * @param drawable icon of information view
+ * @param textResource text of information view
+ */
+ fun show(drawable: Int, textResource: Int) {
+ image_view.setVectorCompat(drawable, context.theme.getResourceColor(android.R.attr.textColorHint))
+ text_label.text = context.getString(textResource)
+ this.visibility = View.VISIBLE
+ }
+}
diff --git a/app/src/main/res/drawable-v21/library_item_selector_dark.xml b/app/src/main/res/drawable-v21/library_item_selector_dark.xml
new file mode 100644
index 000000000..e78c6ec16
--- /dev/null
+++ b/app/src/main/res/drawable-v21/library_item_selector_dark.xml
@@ -0,0 +1,23 @@
+
+
+ -
+
+
-
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/library_item_selector_light.xml b/app/src/main/res/drawable-v21/library_item_selector_light.xml
new file mode 100644
index 000000000..c85ee3913
--- /dev/null
+++ b/app/src/main/res/drawable-v21/library_item_selector_light.xml
@@ -0,0 +1,23 @@
+
+
+ -
+
+
-
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/list_item_selector_dark.xml b/app/src/main/res/drawable-v21/list_item_selector_dark.xml
index d1152832e..3757b9bf5 100644
--- a/app/src/main/res/drawable-v21/list_item_selector_dark.xml
+++ b/app/src/main/res/drawable-v21/list_item_selector_dark.xml
@@ -14,7 +14,7 @@
-
-
+
diff --git a/app/src/main/res/drawable-v21/list_item_selector_light.xml b/app/src/main/res/drawable-v21/list_item_selector_light.xml
index d17e5bf43..ab9d9b675 100644
--- a/app/src/main/res/drawable-v21/list_item_selector_light.xml
+++ b/app/src/main/res/drawable-v21/list_item_selector_light.xml
@@ -14,7 +14,7 @@
-
-
+
diff --git a/app/src/main/res/drawable/library_item_selector_dark.xml b/app/src/main/res/drawable/library_item_selector_dark.xml
new file mode 100644
index 000000000..73de4df07
--- /dev/null
+++ b/app/src/main/res/drawable/library_item_selector_dark.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/library_item_selector_light.xml b/app/src/main/res/drawable/library_item_selector_light.xml
new file mode 100644
index 000000000..9273e00fe
--- /dev/null
+++ b/app/src/main/res/drawable/library_item_selector_light.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/list_item_selector_dark.xml b/app/src/main/res/drawable/list_item_selector_dark.xml
index 2607d316f..97a108663 100644
--- a/app/src/main/res/drawable/list_item_selector_dark.xml
+++ b/app/src/main/res/drawable/list_item_selector_dark.xml
@@ -5,6 +5,6 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/list_item_selector_light.xml b/app/src/main/res/drawable/list_item_selector_light.xml
index 4cb278d90..a33b89da0 100644
--- a/app/src/main/res/drawable/list_item_selector_light.xml
+++ b/app/src/main/res/drawable/list_item_selector_light.xml
@@ -14,6 +14,6 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_edit_categories.xml b/app/src/main/res/layout/activity_edit_categories.xml
index af66227aa..0668bb24e 100644
--- a/app/src/main/res/layout/activity_edit_categories.xml
+++ b/app/src/main/res/layout/activity_edit_categories.xml
@@ -5,7 +5,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:gravity="center">
+ android:gravity="center"
+ android:fitsSystemWindows="true">
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index f631b1d5e..f657d1dc0 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -41,27 +41,12 @@
android:layout_height="match_parent"
android:layout_below="@id/appbar">
-
-
-
-
-
-
-
+ android:layout_gravity="center"
+ android:layout_height="wrap_content"/>
diff --git a/app/src/main/res/layout/activity_manga.xml b/app/src/main/res/layout/activity_manga.xml
index 3f9871b77..3da1c0331 100644
--- a/app/src/main/res/layout/activity_manga.xml
+++ b/app/src/main/res/layout/activity_manga.xml
@@ -1,32 +1,41 @@
-
+
-
+ android:layout_height="match_parent"
+ android:orientation="vertical">
-
-
-
+ android:layout_height="wrap_content">
-
+
-
+
-
\ No newline at end of file
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_preferences.xml b/app/src/main/res/layout/activity_preferences.xml
index c80a17301..7c1371b4f 100644
--- a/app/src/main/res/layout/activity_preferences.xml
+++ b/app/src/main/res/layout/activity_preferences.xml
@@ -1,16 +1,33 @@
-
+
-
-
-
+ android:layout_height="match_parent"
+ android:orientation="vertical">
-
+
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/card_myanimelist_personal.xml b/app/src/main/res/layout/card_myanimelist_personal.xml
index d071cde75..6a6141447 100644
--- a/app/src/main/res/layout/card_myanimelist_personal.xml
+++ b/app/src/main/res/layout/card_myanimelist_personal.xml
@@ -1,142 +1,151 @@
-
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/card_margin"
+ >
+ android:layout_height="wrap_content"
+ android:padding="@dimen/card_margin">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_myanimelist.xml b/app/src/main/res/layout/fragment_myanimelist.xml
index 76d5fcfb4..233a3cb18 100644
--- a/app/src/main/res/layout/fragment_myanimelist.xml
+++ b/app/src/main/res/layout/fragment_myanimelist.xml
@@ -4,23 +4,13 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingBottom="@dimen/margin_bottom"
- android:paddingLeft="@dimen/margin_left"
- android:paddingRight="@dimen/margin_right"
- android:paddingTop="@dimen/margin_top">
+ android:orientation="vertical">
-
-
-
-
-
+
diff --git a/app/src/main/res/layout/item_catalogue_grid.xml b/app/src/main/res/layout/item_catalogue_grid.xml
index ba1ffcb5c..4027c126c 100644
--- a/app/src/main/res/layout/item_catalogue_grid.xml
+++ b/app/src/main/res/layout/item_catalogue_grid.xml
@@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="?attr/selectable_list_drawable">
+ android:background="?attr/selectable_library_drawable">
+ android:background="@drawable/gradient_shape"/>
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values-v21/themes.xml b/app/src/main/res/values-v21/themes.xml
index 4167329f7..0d0eb2e28 100644
--- a/app/src/main/res/values-v21/themes.xml
+++ b/app/src/main/res/values-v21/themes.xml
@@ -6,7 +6,7 @@
@@ -17,7 +17,7 @@
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index 515647a5d..450783da1 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -19,5 +19,6 @@
+
-
\ No newline at end of file
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index c97adead6..28bfe2212 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -7,6 +7,7 @@
16dp
16dp
16dp
+ 16dp
56dp
24dp
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 00d8fffec..975aef227 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -4,11 +4,14 @@
-
+
+
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 8518fd71f..4994a7c86 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -25,13 +25,12 @@
- true
- - ?colorPrimaryDark
- - @style/Theme.ActionBar
- - @style/ThemeOverlay.AppCompat.Light
+ - @style/Theme.ActionBar.Light
- @style/PreferenceThemeOverlay.v14.Material
- @drawable/list_item_selector_light
+ - @drawable/library_item_selector_light
- @drawable/line_divider_light
@@ -58,7 +57,6 @@
- true
- - ?colorPrimaryDark
- @style/ThemeOverlay.AppCompat.Dark.ActionBar
- @style/ThemeOverlay.AppCompat
- @style/PreferenceThemeOverlay.v14.Material
@@ -66,6 +64,7 @@
- @style/Theme.Widget.NavigationView.Dark
- @drawable/list_item_selector_dark
+ - @drawable/library_item_selector_dark
- @drawable/line_divider_dark