diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-01-13 21:55:53 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-01-13 21:55:53 +0100 |
commit | 2e3545949ba9ab48ed21cb2198c9f0d2b8691ba2 (patch) | |
tree | 9fa1d871ca0197d244be974132e0141a64b799ac /OpenKeychain/src/main/res | |
parent | 2f0eb3fbd644291272829c15165193e0edb0906f (diff) | |
download | open-keychain-2e3545949ba9ab48ed21cb2198c9f0d2b8691ba2.tar.gz open-keychain-2e3545949ba9ab48ed21cb2198c9f0d2b8691ba2.tar.bz2 open-keychain-2e3545949ba9ab48ed21cb2198c9f0d2b8691ba2.zip |
Start working on Material Design
Diffstat (limited to 'OpenKeychain/src/main/res')
10 files changed, 154 insertions, 125 deletions
diff --git a/OpenKeychain/src/main/res/layout-v11/safe_slinger_activity.xml b/OpenKeychain/src/main/res/layout-v11/safe_slinger_activity.xml deleted file mode 100644 index 7e4410f85..000000000 --- a/OpenKeychain/src/main/res/layout-v11/safe_slinger_activity.xml +++ /dev/null @@ -1,75 +0,0 @@ -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="16dp" - android:paddingRight="16dp"> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <TextView - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_marginBottom="4dp" - android:layout_marginTop="14dp" - android:text="@string/exchange_description" - android:layout_weight="1" - android:gravity="center_vertical"/> - - <NumberPicker - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:id="@+id/safe_slinger_picker" - /> - - </LinearLayout> - - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" /> - - <LinearLayout - android:id="@+id/safe_slinger_button" - android:layout_width="match_parent" - android:layout_height="?android:attr/listPreferredItemHeight" - android:clickable="true" - android:paddingRight="4dp" - style="@style/SelectableItem" - android:orientation="horizontal"> - - <TextView - android:paddingLeft="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="0dip" - android:layout_height="match_parent" - android:text="Start exchange" - android:layout_weight="1" - android:gravity="center_vertical" /> - - <!-- separate ImageView required for recoloring --> - <ImageView - android:id="@+id/safe_slinger_button_image" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:padding="8dp" - android:src="@drawable/ic_action_safeslinger" - android:layout_gravity="center_vertical" /> - - </LinearLayout> - - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:layout_marginBottom="4dp" - android:background="?android:attr/listDivider" /> - - </LinearLayout> -</ScrollView> diff --git a/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml b/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml index 7f7b2cdce..189579f91 100644 --- a/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml +++ b/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml @@ -86,7 +86,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/create_key_rsa" - android:textColor="@color/android_green_dark" + android:textColor="@color/android_green_light" android:textAppearance="?android:attr/textAppearanceMedium" android:minHeight="?android:attr/listPreferredItemHeight" android:clickable="true" @@ -128,7 +128,7 @@ android:layout_marginTop="16dp" android:layout_marginBottom="8dp" android:text="@string/create_key_final_robot_text" - android:textColor="@color/android_green_dark" + android:textColor="@color/android_green_light" android:textAppearance="?android:attr/textAppearanceMedium" android:drawableLeft="@drawable/create_key_robot" android:drawablePadding="8dp" /> diff --git a/OpenKeychain/src/main/res/layout/key_list_content.xml b/OpenKeychain/src/main/res/layout/key_list_content.xml index dd230806f..7179793b5 100644 --- a/OpenKeychain/src/main/res/layout/key_list_content.xml +++ b/OpenKeychain/src/main/res/layout/key_list_content.xml @@ -1,47 +1,56 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> - <include layout="@layout/notify_area" /> + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> <LinearLayout - android:id="@+id/content_frame" - android:layout_marginLeft="@dimen/drawer_content_padding" android:orientation="vertical" + android:layout_below="@id/toolbar" android:layout_width="match_parent" android:layout_height="match_parent"> - <!--<LinearLayout + <include layout="@layout/notify_area" /> + + <LinearLayout + android:id="@+id/content_frame" + android:layout_marginLeft="@dimen/drawer_content_padding" android:orientation="vertical" - android:background="@color/holo_gray_bright" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="match_parent"> - <Spinner - android:id="@+id/key_list_filter_spinner" + <!--<LinearLayout + android:orientation="vertical" + android:background="@color/holo_gray_bright" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dp" - android:layout_marginRight="12dp" - android:layout_marginTop="4dp" - android:layout_marginBottom="4dp" /> - - <View + android:layout_height="wrap_content"> + + <Spinner + android:id="@+id/key_list_filter_spinner" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="12dp" + android:layout_marginRight="12dp" + android:layout_marginTop="4dp" + android:layout_marginBottom="4dp" /> + + <View + android:layout_width="match_parent" + android:layout_height="1dip" + android:background="?android:attr/listDivider" /> + + </LinearLayout>--> + + <fragment + android:id="@+id/key_list_fragment" + android:name="org.sufficientlysecure.keychain.ui.KeyListFragment" android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" /> - - </LinearLayout>--> - - <fragment - android:id="@+id/key_list_fragment" - android:name="org.sufficientlysecure.keychain.ui.KeyListFragment" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" /> + android:layout_height="0dp" + android:layout_weight="1" /> + </LinearLayout> </LinearLayout> - -</LinearLayout>
\ No newline at end of file +</RelativeLayout> diff --git a/OpenKeychain/src/main/res/layout/safe_slinger_activity.xml b/OpenKeychain/src/main/res/layout/safe_slinger_activity.xml index 39f4b7238..7e4410f85 100644 --- a/OpenKeychain/src/main/res/layout/safe_slinger_activity.xml +++ b/OpenKeychain/src/main/res/layout/safe_slinger_activity.xml @@ -16,17 +16,18 @@ <TextView android:layout_width="0dp" - android:layout_height="wrap_content" + android:layout_height="match_parent" android:layout_marginBottom="4dp" android:layout_marginTop="14dp" android:text="@string/exchange_description" - android:layout_weight="1"/> + android:layout_weight="1" + android:gravity="center_vertical"/> - <Spinner + <NumberPicker android:layout_width="wrap_content" android:layout_height="wrap_content" - android:id="@+id/safe_slinger_spinner" - android:gravity="center_vertical"/> + android:id="@+id/safe_slinger_picker" + /> </LinearLayout> diff --git a/OpenKeychain/src/main/res/layout/toolbar.xml b/OpenKeychain/src/main/res/layout/toolbar.xml new file mode 100644 index 000000000..d0c5e4f99 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/toolbar.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?attr/colorPrimaryDark" + app:theme="@style/KeychainToolbarOverflow" + app:popupTheme="@style/KeychainTheme" />
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/values-v11/themes_keychaintheme.xml b/OpenKeychain/src/main/res/values-v11/themes_keychaintheme.xml index 4f13f81c6..6db455383 100644 --- a/OpenKeychain/src/main/res/values-v11/themes_keychaintheme.xml +++ b/OpenKeychain/src/main/res/values-v11/themes_keychaintheme.xml @@ -3,7 +3,7 @@ <!-- Generated with http://android-holo-colors.com --> <resources xmlns:android="http://schemas.android.com/apk/res/android"> - <style name="KeychainTheme" parent="@style/_KeychainTheme"/> + <style name="KeychainThemeOLD" parent="@style/_KeychainTheme"/> <style name="_KeychainTheme" parent="Theme.AppCompat.Light"> diff --git a/OpenKeychain/src/main/res/values-v21/themes.xml b/OpenKeychain/src/main/res/values-v21/themes.xml new file mode 100644 index 000000000..7ba601d79 --- /dev/null +++ b/OpenKeychain/src/main/res/values-v21/themes.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="KeychainTheme" parent="KeychainTheme.Base"> + <item name="android:windowContentTransitions">true</item> + <item name="android:windowAllowEnterTransitionOverlap">true</item> + <item name="android:windowAllowReturnTransitionOverlap">true</item> + <item name="android:windowSharedElementEnterTransition">@android:transition/move</item> + <item name="android:windowSharedElementExitTransition">@android:transition/move</item> + </style> +</resources>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/values/colors.xml b/OpenKeychain/src/main/res/values/colors.xml index a21f949d1..353e33058 100644 --- a/OpenKeychain/src/main/res/values/colors.xml +++ b/OpenKeychain/src/main/res/values/colors.xml @@ -1,8 +1,35 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <color name="emphasis">#aa66cc</color> - <color name="emphasis_dark">#9933cc</color> + <!--<color name="colorPrimary">@color/material_deep_teal_500</color>--> + <!--<color name="colorPrimaryDark">@color/material_blue_grey_900</color>--> + + <!-- TODO: --> + + <color name="colorSecondary">@color/material_deep_teal_200</color> + <color name="colorSecondaryDark">@color/material_deep_teal_500</color> + <!--<color name="windowBackgroundColor">#333333</color>--> + <color name="black_translucent">#80000000</color> + + <!-- Palette generated by Material Palette materialpalette.com/green/indigo --> + <color name="colorPrimary">#4CAF50</color> + <color name="colorPrimaryDark">#388E3C</color> + + <!-- TODO: --> + <color name="primary">#4CAF50</color> + <color name="primary_dark">#388E3C</color> + <color name="primary_light">#C8E6C9</color> + <color name="accent">#536DFE</color> + <color name="primary_text">#212121</color> + <color name="secondary_text">#727272</color> + <color name="icons">#FFFFFF</color> + <color name="divider">#B6B6B6</color> + + + <!-- set to text colors --> + <color name="emphasis">#212121</color> + <color name="emphasis_dark">#727272</color> + <color name="bg_gray">#cecbce</color> <color name="tertiary_text_light">#808080</color> <color name="alert">#ffdd3333</color> @@ -10,14 +37,18 @@ <color name="holo_gray_light">#33999999</color> <color name="holo_gray_bright">#33CCCCCC</color> - <!-- http://developer.android.com/design/style/color.html --> - <color name="android_red_light">#ffff4444</color> - <color name="android_red_dark">#ffCC0000</color> - <color name="android_orange_light">#ffffbb33</color> - <color name="android_orange_dark">#ffFF8800</color> - <color name="android_green_light">#ff99cc00</color> - <color name="android_green_dark">#ff669900</color> - <color name="android_purple_light">#ffaa66cc</color> - <color name="android_purple_dark">#ff9933CC</color> + <!-- + http://www.google.com/design/spec/style/color.html#color-color-palette + light = normal color + dark = 900 + --> + <color name="android_red_light">#f44336</color> + <color name="android_red_dark">#b71c1c</color> + <color name="android_orange_light">#ff9800</color> + <color name="android_orange_dark">#e65100</color> + <color name="android_green_light">#4caf50</color> + <color name="android_green_dark">#1b5e20</color> + <color name="android_purple_light">#673ab7</color> + <color name="android_purple_dark">#311b92</color> </resources> diff --git a/OpenKeychain/src/main/res/values/styles.xml b/OpenKeychain/src/main/res/values/styles.xml index 27cd1546a..11d2bfde4 100644 --- a/OpenKeychain/src/main/res/values/styles.xml +++ b/OpenKeychain/src/main/res/values/styles.xml @@ -2,7 +2,7 @@ <resources> <!-- Used in Android < 4 --> - <style name="KeychainTheme" parent="@style/Theme.AppCompat.Light"> + <style name="KeychainThemeOLD" parent="@style/Theme.AppCompat.Light"> <item name="android:alertDialogStyle">@style/CustomDialogTheme</item> </style> @@ -34,4 +34,35 @@ <item name="android:background">@drawable/selector_transparent_button</item> </style> + <!-- + Make Toolbar with white text and white overflow menu + http://www.murrayc.com/permalink/2014/10/28/android-changing-the-toolbars-text-color-and-overflow-icon-color/ + --> + <style name="KeychainToolbarOverflow" parent="KeychainTheme"> + <!-- android:textColorPrimary is the color of the title text + in the Toolbar, in the Theme.AppCompat theme: --> + <item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item> + + <!-- android:textColorPrimaryInverse is the color of the title + text in the Toolbar, in the Theme.AppCompat.Light theme: --> + <!-- <item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</item> --> + + <!-- android:actionMenuTextColor is the color of the text of + action (menu) items in the Toolbar, at least in the + Theme.AppCompat theme. + For some reason, they already get the textColorPrimary + when running on API 21, but not on older versions of + Android, so this is only necessary to support older + Android versions.--> + <item name="actionMenuTextColor">@color/abc_primary_text_material_dark</item> + <!-- android:textColorSecondary is the color of the menu + overflow icon (three vertical dots) --> + <item name="android:textColorSecondary">@color/abc_primary_text_material_dark</item> + + <!-- This would set the toolbar's background color, + but setting this also changes the popup menu's background, + even if we define popupTheme for our <Toolbar> --> + <!-- <item name="android:background">@color/color_primary</item> --> + </style> + </resources>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/values/themes.xml b/OpenKeychain/src/main/res/values/themes.xml new file mode 100644 index 000000000..864e2805c --- /dev/null +++ b/OpenKeychain/src/main/res/values/themes.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="KeychainTheme" parent="KeychainTheme.Base" /> + + <style name="KeychainTheme.Base" parent="Theme.AppCompat.Light"> + <item name="colorPrimary">@color/colorPrimary</item> + <item name="colorPrimaryDark">@color/colorPrimary</item> + <item name="android:windowNoTitle">true</item> + <item name="windowActionBar">false</item> + </style> +</resources>
\ No newline at end of file |