Fixed styling issues with the toolbar

This commit is contained in:
Anthony Restaino 2015-01-28 21:17:25 -05:00
parent a201f88906
commit 8be2b62601
14 changed files with 130 additions and 49 deletions

View File

@ -105,7 +105,7 @@
android:name="acr.browser.lightning.SettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings"
android:theme="@style/Theme.LightTheme" >
android:theme="@style/Theme.SettingsTheme" >
<intent-filter>
<action android:name="android.intent.action.SETTINGS" />
@ -116,7 +116,7 @@
android:name="acr.browser.lightning.GeneralSettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_general"
android:theme="@style/Theme.LightTheme" >
android:theme="@style/Theme.SettingsTheme" >
<intent-filter>
<action android:name="android.intent.action.GENERAL_SETTINGS" />
@ -127,7 +127,7 @@
android:name="acr.browser.lightning.DisplaySettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_display"
android:theme="@style/Theme.LightTheme" >
android:theme="@style/Theme.SettingsTheme" >
<intent-filter>
<action android:name="android.intent.action.DISPLAY_SETTINGS" />
@ -138,7 +138,7 @@
android:name="acr.browser.lightning.PrivacySettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_privacy"
android:theme="@style/Theme.LightTheme" >
android:theme="@style/Theme.SettingsTheme" >
<intent-filter>
<action android:name="android.intent.action.PRIVACY_SETTINGS" />
@ -149,7 +149,7 @@
android:name="acr.browser.lightning.AdvancedSettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_advanced"
android:theme="@style/Theme.LightTheme" >
android:theme="@style/Theme.SettingsTheme" >
<intent-filter>
<action android:name="android.intent.action.ADVANCED_SETTINGS" />
@ -160,7 +160,7 @@
android:name="acr.browser.lightning.AboutSettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_about"
android:theme="@style/Theme.LightTheme" >
android:theme="@style/Theme.SettingsTheme" >
<intent-filter>
<action android:name="android.intent.action.ABOUT_SETTINGS" />
@ -185,7 +185,7 @@
android:name="acr.browser.lightning.LicenseActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/licenses"
android:theme="@style/Theme.LightTheme" >
android:theme="@style/Theme.SettingsTheme" >
<intent-filter>
<action android:name="android.intent.action.LICENSE" />
@ -196,7 +196,7 @@
android:name="acr.browser.lightning.BookmarkActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/bookmark_settings"
android:theme="@style/Theme.LightTheme" >
android:theme="@style/Theme.SettingsTheme" >
<intent-filter>
<action android:name="android.intent.action.BOOKMARK" />

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<include layout="@layout/toolbar_settings" />
<ScrollView
android:id="@+id/scrollView1"

View File

@ -1,6 +1,6 @@
<!-- Copyright 2014 ACR Development -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -19,24 +19,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:elevation="2dp"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<acr.browser.lightning.AnimatedProgressBar
android:id="@+id/progress_view"
android:layout_width="match_parent"
android:layout_height="2dp"
custom:backgroundColor="?progressBackgroundColor"
custom:bidirectionalAnimate="false"
custom:progressColor="?colorAccent" />
</LinearLayout>
<include layout="@layout/toolbar" />
<include layout="@layout/browser_content" />

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<include layout="@layout/toolbar_settings" />
<ScrollView
android:id="@+id/scrollView1"

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<include layout="@layout/toolbar_settings" />
<LinearLayout
android:id="@+id/exportBackup"

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<include layout="@layout/toolbar_settings" />
<ScrollView
android:id="@+id/scrollView1"

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<include layout="@layout/toolbar_settings" />
<ScrollView
android:id="@+id/scrollView1"

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<include layout="@layout/toolbar_settings" />
<LinearLayout
android:id="@+id/browserLicense"

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<include layout="@layout/toolbar_settings" />
<ScrollView
android:id="@+id/scrollView1"

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<include layout="@layout/toolbar_settings" />
<ScrollView
android:id="@+id/scrollView1"

View File

@ -1,10 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?colorPrimary"
android:minHeight="?attr/actionBarSize"
custom:contentInsetEnd="0dp"
custom:contentInsetStart="0dp" />
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:elevation="2dp"
android:orientation="vertical" >
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
custom:contentInsetEnd="0dp"
custom:contentInsetStart="0dp" />
<acr.browser.lightning.AnimatedProgressBar
android:id="@+id/progress_view"
android:layout_width="match_parent"
android:layout_height="2dp"
custom:bidirectionalAnimate="false"
custom:backgroundColor="?attr/progressBackgroundColor"
custom:progressColor="?attr/colorAccent" />
</LinearLayout>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?colorPrimary"
android:minHeight="?attr/actionBarSize"
android:elevation="2dp"
custom:contentInsetEnd="0dp"
custom:contentInsetStart="0dp" />

60
res/values-v21/styles.xml Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.SettingsTheme" parent="Theme.AppCompat.Light">
<!-- customize the color palette -->
<item name="listBackground">@drawable/list_bg</item>
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/secondary_color_settings</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="Theme.LightTheme" parent="Theme.AppCompat.Light">
<!-- customize the color palette -->
<item name="searchBackground">@drawable/card_bg</item>
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/secondary_color</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="progressBackgroundColor">#00000000</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
<item name="numberColor">@color/gray_dark</item>
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="android:actionBarStyle">@style/LightActionBar</item>
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
</style>
<style name="Theme.DarkTheme" parent="Theme.AppCompat">
<!-- customize the color palette -->
<item name="searchBackground">@drawable/card_bg</item>
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="colorPrimary">@color/primary_color_dark</item>
<item name="colorPrimaryDark">@color/secondary_color</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="progressBackgroundColor">#00000000</item>
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
<item name="numberColor">@color/gray_dark</item>
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="android:actionBarStyle">@style/LightActionBar</item>
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
</style>
</resources>

View File

@ -1,17 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.SettingsTheme" parent="Theme.AppCompat.Light">
<!-- customize the color palette -->
<item name="listBackground">@drawable/list_bg</item>
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/secondary_color_settings</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="Theme.LightTheme" parent="Theme.AppCompat.Light">
<!-- customize the color palette -->
<item name="searchBackground">@drawable/card_bg</item>
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="searchBackground">@drawable/card_bg_elevate</item>
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/secondary_color</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="progressBackgroundColor">#00000000</item>
<item name="progressBackgroundColor">@color/secondary_color</item>
<item name="listBackground">@drawable/list_bg</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
@ -26,14 +38,14 @@
<style name="Theme.DarkTheme" parent="Theme.AppCompat">
<!-- customize the color palette -->
<item name="searchBackground">@drawable/card_bg</item>
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="searchBackground">@drawable/card_bg_elevate</item>
<item name="colorPrimary">@color/primary_color_dark</item>
<item name="colorPrimaryDark">@color/secondary_color</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="progressBackgroundColor">#00000000</item>
<item name="windowActionBar">false</item>
<item name="progressBackgroundColor">@color/secondary_color</item>
<item name="listBackground">@drawable/list_bg</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
@ -41,7 +53,6 @@
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="android:actionBarStyle">@style/LightActionBar</item>
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
</style>