From 9853804fd884bc3e64da0e2a82e51b421223e6dd Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Thu, 29 Jan 2015 13:25:19 -0500 Subject: [PATCH] Complete Material Design for Settings --- res/drawable/toolbar_elevate.xml | 19 +++ res/layout/about_settings.xml | 28 ++-- res/layout/advanced_settings.xml | 46 +++---- ...ark_activity.xml => bookmark_settings.xml} | 26 ++-- res/layout/display_settings.xml | 52 +++---- res/layout/general_settings.xml | 50 +++---- res/layout/license_activity.xml | 41 +++--- res/layout/privacy_settings.xml | 76 +++++------ res/layout/settings.xml | 129 +++++++++--------- res/layout/toolbar.xml | 2 +- res/layout/toolbar_settings.xml | 4 +- res/values-v21/styles.xml | 1 + res/values/attr.xml | 1 + res/values/styles.xml | 1 + .../browser/lightning/BookmarkActivity.java | 2 +- .../browser/lightning/LicenseActivity.java | 11 +- .../browser/lightning/SettingsActivity.java | 39 ++---- 17 files changed, 267 insertions(+), 261 deletions(-) create mode 100644 res/drawable/toolbar_elevate.xml rename res/layout/{bookmark_activity.xml => bookmark_settings.xml} (81%) diff --git a/res/drawable/toolbar_elevate.xml b/res/drawable/toolbar_elevate.xml new file mode 100644 index 0000000..e63e4b7 --- /dev/null +++ b/res/drawable/toolbar_elevate.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/about_settings.xml b/res/layout/about_settings.xml index 3f5b726..243beac 100644 --- a/res/layout/about_settings.xml +++ b/res/layout/about_settings.xml @@ -20,7 +20,7 @@ android:id="@+id/layoutSource" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/listChoiceBackgroundIndicator" + android:background="?attr/listChoiceBackgroundIndicator" android:minHeight="60dp" android:paddingBottom="10dp" android:paddingTop="10dp" > @@ -36,7 +36,7 @@ android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/action_follow_me" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -44,7 +44,7 @@ android:id="@+id/isImportAvailable" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/url_twitter" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -54,15 +54,15 @@ @@ -78,7 +78,7 @@ android:id="@+id/textView12" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/licenses" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -87,15 +87,15 @@ @@ -110,7 +110,7 @@ @@ -118,7 +118,7 @@ android:id="@+id/versionCode" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="Small Text" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -128,8 +128,8 @@ diff --git a/res/layout/advanced_settings.xml b/res/layout/advanced_settings.xml index 7f838c5..1de0dc5 100644 --- a/res/layout/advanced_settings.xml +++ b/res/layout/advanced_settings.xml @@ -20,7 +20,7 @@ android:id="@+id/rAllowPopups" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/listChoiceBackgroundIndicator" + android:background="?attr/listChoiceBackgroundIndicator" android:minHeight="60dp" android:paddingBottom="10dp" android:paddingRight="10dp" @@ -37,7 +37,7 @@ android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:paddingRight="30dp" android:text="@string/window" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -45,7 +45,7 @@ @@ -96,7 +96,7 @@ @@ -155,15 +155,15 @@ @@ -190,15 +190,15 @@ @@ -215,7 +215,7 @@ android:id="@+id/renderText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="Small Text" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -224,8 +224,8 @@ diff --git a/res/layout/bookmark_activity.xml b/res/layout/bookmark_settings.xml similarity index 81% rename from res/layout/bookmark_activity.xml rename to res/layout/bookmark_settings.xml index ee44035..c722801 100644 --- a/res/layout/bookmark_activity.xml +++ b/res/layout/bookmark_settings.xml @@ -10,7 +10,7 @@ android:id="@+id/exportBackup" android:layout_width="match_parent" android:layout_height="60dp" - android:background="?android:attr/listChoiceBackgroundIndicator" + android:background="?attr/listChoiceBackgroundIndicator" android:gravity="center_vertical" android:orientation="vertical" android:paddingBottom="10dp" @@ -20,7 +20,7 @@ android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/export_bookmarks" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -28,15 +28,15 @@ @@ -54,22 +54,22 @@ @@ -77,7 +77,7 @@ android:id="@+id/isImportBrowserAvailable" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/recommended" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -86,8 +86,8 @@ \ No newline at end of file diff --git a/res/layout/display_settings.xml b/res/layout/display_settings.xml index eeefd09..68c6659 100644 --- a/res/layout/display_settings.xml +++ b/res/layout/display_settings.xml @@ -20,7 +20,7 @@ android:id="@+id/rHideStatusBar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/listChoiceBackgroundIndicator" + android:background="?attr/listChoiceBackgroundIndicator" android:minHeight="60dp" android:paddingBottom="10dp" android:paddingRight="10dp" @@ -31,7 +31,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:paddingRight="30dp" android:text="@string/fullScreenOption" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -47,15 +47,15 @@ @@ -82,15 +82,15 @@ @@ -115,7 +115,7 @@ @@ -166,7 +166,7 @@ @@ -219,15 +219,15 @@ @@ -237,7 +237,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/size" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -245,8 +245,8 @@ diff --git a/res/layout/general_settings.xml b/res/layout/general_settings.xml index a2c6e09..53ac6c7 100644 --- a/res/layout/general_settings.xml +++ b/res/layout/general_settings.xml @@ -20,7 +20,7 @@ android:id="@+id/layoutUserAgent" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/listChoiceBackgroundIndicator" + android:background="?attr/listChoiceBackgroundIndicator" android:minHeight="60dp" android:paddingBottom="10dp" android:paddingTop="10dp" > @@ -36,7 +36,7 @@ android:id="@+id/textView4" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/agent" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -44,7 +44,7 @@ android:id="@+id/agentText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="Small Text" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -54,15 +54,15 @@ @@ -78,7 +78,7 @@ android:id="@+id/textView5" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/download" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -86,7 +86,7 @@ android:id="@+id/downloadText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="Small Text" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -96,15 +96,15 @@ @@ -120,7 +120,7 @@ android:id="@+id/textView6" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/home" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -128,7 +128,7 @@ android:id="@+id/homepageText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="Small Text" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -138,15 +138,15 @@ @@ -161,7 +161,7 @@ @@ -169,7 +169,7 @@ android:id="@+id/searchText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="Small Text" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -179,15 +179,15 @@ @@ -211,7 +211,7 @@ diff --git a/res/layout/license_activity.xml b/res/layout/license_activity.xml index 5d11ced..53a53f5 100644 --- a/res/layout/license_activity.xml +++ b/res/layout/license_activity.xml @@ -3,14 +3,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > - @@ -19,7 +18,7 @@ android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/app_name" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -27,7 +26,7 @@ android:id="@+id/isImportAvailable1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/mpl_license" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -36,15 +35,15 @@ @@ -53,7 +52,7 @@ android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/android_open_source_project" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -61,7 +60,7 @@ android:id="@+id/isImportAvailable2" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/apache" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -70,15 +69,15 @@ @@ -87,7 +86,7 @@ android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/hphosts_ad_server_list" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -95,7 +94,7 @@ android:id="@+id/isImportAvailable3" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/freeware" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -104,15 +103,15 @@ @@ -121,7 +120,7 @@ android:id="@+id/textView4" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/library_netcipher" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -129,7 +128,7 @@ android:id="@+id/isImportAvailable4" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/license_gnu" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -138,8 +137,8 @@ \ No newline at end of file diff --git a/res/layout/privacy_settings.xml b/res/layout/privacy_settings.xml index e5bea2e..0d2a8d5 100644 --- a/res/layout/privacy_settings.xml +++ b/res/layout/privacy_settings.xml @@ -20,7 +20,7 @@ android:id="@+id/rLocation" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/listChoiceBackgroundIndicator" + android:background="?attr/listChoiceBackgroundIndicator" android:minHeight="60dp" android:paddingBottom="10dp" android:paddingRight="10dp" @@ -32,7 +32,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:paddingRight="30dp" android:text="@string/location" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -48,15 +48,15 @@ @@ -82,7 +82,7 @@ android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:paddingRight="30dp" android:text="@string/recommended" android:textAppearance="?android:attr/textAppearanceSmall" @@ -100,15 +100,15 @@ @@ -136,15 +136,15 @@ @@ -171,15 +171,15 @@ @@ -206,15 +206,15 @@ @@ -239,7 +239,7 @@ android:id="@+id/isBrowserAvailable" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="text" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -256,15 +256,15 @@ @@ -274,7 +274,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/clear_cache" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -282,15 +282,15 @@ @@ -300,7 +300,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/history" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -308,15 +308,15 @@ @@ -326,7 +326,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/clear_cookies" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -334,8 +334,8 @@ diff --git a/res/layout/settings.xml b/res/layout/settings.xml index a650fd6..b8de31e 100644 --- a/res/layout/settings.xml +++ b/res/layout/settings.xml @@ -20,7 +20,7 @@ android:id="@+id/layoutFlash" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/listChoiceBackgroundIndicator" + android:background="?attr/listChoiceBackgroundIndicator" android:minHeight="60dp" android:paddingBottom="10dp" android:paddingRight="10dp" @@ -32,32 +32,31 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:paddingRight="60dp" android:text="@string/flash" android:textAppearance="?android:attr/textAppearanceMedium" /> - - + android:layout_centerVertical="true" /> - - + android:layout_centerVertical="true" /> - - + android:layout_centerVertical="true" /> - - + android:layout_centerVertical="true" /> - - + android:layout_centerVertical="true" /> @@ -214,7 +209,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/settings_general" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -222,15 +217,15 @@ @@ -240,7 +235,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/bookmark_settings" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -248,15 +243,15 @@ @@ -267,7 +262,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/settings_display" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -275,15 +270,15 @@ @@ -294,7 +289,7 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/settings_privacy" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -302,15 +297,15 @@ @@ -321,23 +316,23 @@ android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/settings_advanced" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -353,7 +348,7 @@ android:id="@+id/textView11" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/settings_about" android:textAppearance="?android:attr/textAppearanceMedium" /> @@ -361,7 +356,7 @@ android:id="@+id/isImportAvailable" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="10dp" + android:paddingLeft="16dp" android:text="@string/settings_about_explain" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/light" /> @@ -371,8 +366,8 @@ diff --git a/res/layout/toolbar.xml b/res/layout/toolbar.xml index 1dcc2ac..c99c27c 100644 --- a/res/layout/toolbar.xml +++ b/res/layout/toolbar.xml @@ -19,8 +19,8 @@ android:id="@+id/progress_view" android:layout_width="match_parent" android:layout_height="2dp" - custom:bidirectionalAnimate="false" custom:backgroundColor="?attr/progressBackgroundColor" + custom:bidirectionalAnimate="false" custom:progressColor="?attr/colorAccent" /> \ No newline at end of file diff --git a/res/layout/toolbar_settings.xml b/res/layout/toolbar_settings.xml index 8960859..bf3cf82 100644 --- a/res/layout/toolbar_settings.xml +++ b/res/layout/toolbar_settings.xml @@ -4,8 +4,8 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?colorPrimary" - android:minHeight="?attr/actionBarSize" + android:background="?toolbarSettingsBackground" android:elevation="2dp" + android:minHeight="?attr/actionBarSize" custom:contentInsetEnd="0dp" custom:contentInsetStart="0dp" /> diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml index a44c162..6019678 100644 --- a/res/values-v21/styles.xml +++ b/res/values-v21/styles.xml @@ -4,6 +4,7 @@