From 637dda2e223d0900c26d9713d22b309f06392b9f Mon Sep 17 00:00:00 2001 From: len Date: Sat, 21 May 2016 15:39:41 +0200 Subject: [PATCH] Make status bar transparent on API >= 21 --- .../kanade/tachiyomi/ui/main/MainActivity.kt | 7 +-- .../res/layout/activity_edit_categories.xml | 3 +- app/src/main/res/layout/activity_manga.xml | 59 +++++++++++-------- .../main/res/layout/activity_preferences.xml | 39 ++++++++---- app/src/main/res/values-v21/themes.xml | 4 +- 5 files changed, 67 insertions(+), 45 deletions(-) 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 7252e5ecae..e6f67e9032 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 @@ -29,17 +28,13 @@ 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 diff --git a/app/src/main/res/layout/activity_edit_categories.xml b/app/src/main/res/layout/activity_edit_categories.xml index af66227aaa..0668bb24ed 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_manga.xml b/app/src/main/res/layout/activity_manga.xml index 3f9871b771..3da1c0331c 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 c80a17301e..7c1371b4f4 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/values-v21/themes.xml b/app/src/main/res/values-v21/themes.xml index 4167329f72..0d0eb2e282 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 @@