No need for custom attribute
From what I know, actionBarTheme and actionBarPopupTheme will do the job.
This commit is contained in:
parent
a814792594
commit
083339f60e
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@ -10,7 +11,8 @@
|
||||
android:title="@string/menu_manage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="?attr/toolbar_theme"/>
|
||||
app:theme="?attr/actionBarTheme"
|
||||
app:popupTheme="?attr/actionBarPopupTheme" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list"
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
@ -10,7 +10,8 @@
|
||||
android:title="@string/repo_details"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="?attr/toolbar_theme" />
|
||||
app:theme="?attr/actionBarTheme"
|
||||
app:popupTheme="?attr/actionBarPopupTheme" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -10,6 +10,8 @@
|
||||
<item name="android:textColorLink">@color/fdroid_green</item>
|
||||
<item name="alertDialogTheme">@style/AlertDialogThemeDark</item>
|
||||
<item name="android:textViewStyle">@style/TextViewStyle</item>
|
||||
<item name="actionBarTheme">@style/AppThemeLight.Toolbar</item>
|
||||
<item name="actionBarPopupTheme">@style/AppThemeLight.Toolbar</item>
|
||||
</style>
|
||||
|
||||
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
@ -21,7 +23,8 @@
|
||||
<item name="android:textColorLink">@color/fdroid_green</item>
|
||||
<item name="alertDialogTheme">@style/AlertDialogThemeLight</item>
|
||||
<item name="android:textViewStyle">@style/TextViewStyle</item>
|
||||
<item name="toolbar_theme">@style/AppThemeLight.Toolbar</item>
|
||||
<item name="actionBarTheme">@style/AppThemeLight.Toolbar</item>
|
||||
<item name="actionBarPopupTheme">@style/AppThemeLight.Toolbar</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeDark" parent="AppBaseThemeDark">
|
||||
@ -63,13 +66,6 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<!--
|
||||
We need to support either light or dark coloured toolbars. Most tutorials online about styling
|
||||
the Toolbar widget revolve around one style only, which is not conditioned on the current theme.
|
||||
See http://stackoverflow.com/a/32789928/2391921 for this solution.
|
||||
-->
|
||||
<attr name="toolbar_theme" format="reference" />
|
||||
|
||||
<style name="AppThemeLight.Toolbar" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="android:background">@color/fdroid_blue</item>
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user