diff options
author | Vinod Krishnan <vinodkrishnan@google.com> | 2015-09-10 09:42:27 -0700 |
---|---|---|
committer | Vinod Krishnan <vinodkrishnan@google.com> | 2015-09-14 15:21:47 -0700 |
commit | 03dc824d37099b29acb5a0aa28e881d5b05cce0e (patch) | |
tree | 146c411c4375c59c6a11689b7d591a26c4afce4f /res | |
parent | 46fed54b3ee49e4bebabca50bcff5bceaece96b8 (diff) | |
download | android_packages_apps_PackageInstaller-03dc824d37099b29acb5a0aa28e881d5b05cce0e.tar.gz android_packages_apps_PackageInstaller-03dc824d37099b29acb5a0aa28e881d5b05cce0e.tar.bz2 android_packages_apps_PackageInstaller-03dc824d37099b29acb5a0aa28e881d5b05cce0e.zip |
Changing layout to make button animations work
- Fix the Permissions Dialogs for round layout
- Show animation for the buttons
- Also fixed the names ellipsis issue.
- Fixed the theming of the dialogs.
Bug: 23118402
Change-Id: I385c827ac41b06222334c36bfda2c70b346232a2
Diffstat (limited to 'res')
-rw-r--r-- | res/layout-watch/grant_permissions.xml | 112 | ||||
-rw-r--r-- | res/values-round/dimens.xml | 25 | ||||
-rw-r--r-- | res/values-watch/colors.xml | 3 | ||||
-rw-r--r-- | res/values-watch/dimens.xml | 7 | ||||
-rw-r--r-- | res/values-watch/themes.xml | 12 |
5 files changed, 94 insertions, 65 deletions
diff --git a/res/layout-watch/grant_permissions.xml b/res/layout-watch/grant_permissions.xml index 2d567068..165de29f 100644 --- a/res/layout-watch/grant_permissions.xml +++ b/res/layout-watch/grant_permissions.xml @@ -15,12 +15,9 @@ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - xmlns:tools="http://schemas.android.com/tools" android:id="@+id/confirmation" android:layout_width="match_parent" - android:layout_height="match_parent" - > + android:layout_height="match_parent"> <ScrollView android:id="@+id/scrolling_container" @@ -32,6 +29,7 @@ <LinearLayout android:id="@+id/content" android:orientation="vertical" + android:paddingBottom="@dimen/conf_diag_button_container_height" android:layout_width="match_parent" android:layout_height="wrap_content"> @@ -62,60 +60,62 @@ android:gravity="center" android:fontFamily="sans-serif-condensed-light" android:textAppearance="@style/GrantPermissions.TitleText"/> + </LinearLayout> + </ScrollView> - <!-- TODO: Change this to use a ViewStub instead of show/hiding the two layouts --> - <FrameLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:id="@+id/button_bar_container" - android:layout_gravity="bottom" - android:background="#FF606060"> - <FrameLayout - android:id="@+id/horizontal_button_bar" - android:layout_width="match_parent" - android:layout_height="72dp"> - <Button - android:id="@+id/horizontal_deny_button" - android:layout_width="54dp" - android:layout_height="54dp" - android:layout_gravity="top|left" - android:layout_marginLeft="16dp" - android:layout_marginTop="9dp" - android:background="@drawable/cancel_button"/> + <!-- TODO: Change this to use a ViewStub instead of show/hiding the two layouts --> + <FrameLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/button_bar_container" + android:layout_gravity="bottom" + android:background="#FF606060"> + <FrameLayout + android:id="@+id/horizontal_button_bar" + android:layout_width="match_parent" + android:layout_height="@dimen/conf_diag_button_container_height"> + <Button + android:id="@+id/horizontal_deny_button" + android:layout_width="54dp" + android:layout_height="54dp" + android:layout_gravity="top|left" + android:layout_marginLeft="@dimen/conf_diag_2button_margin_side" + android:layout_marginTop="@dimen/conf_diag_2button_margin_top" + android:background="@drawable/cancel_button"/> - <Button - android:id="@+id/horizontal_allow_button" - android:layout_width="54dp" - android:layout_height="54dp" - android:layout_gravity="top|right" - android:layout_marginRight="16dp" - android:layout_marginTop="9dp" - android:background="@drawable/confirm_button"/> - </FrameLayout> + <Button + android:id="@+id/horizontal_allow_button" + android:layout_width="54dp" + android:layout_height="54dp" + android:layout_gravity="top|right" + android:layout_marginRight="@dimen/conf_diag_2button_margin_side" + android:layout_marginTop="@dimen/conf_diag_2button_margin_top" + android:background="@drawable/confirm_button"/> + </FrameLayout> - <FrameLayout - android:id="@+id/vertical_button_bar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:visibility="gone"> - <LinearLayout - android:id="@+id/buttonPanel" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> - <Button - android:id="@+id/vertical_allow_button" - style="@style/Widget.WearDiag.Button"/> + <FrameLayout + android:id="@+id/vertical_button_bar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/conf_diag_3button_margin_left" + android:layout_marginBottom="@dimen/conf_diag_3button_margin_bottom" + android:visibility="gone"> + <LinearLayout + android:id="@+id/buttonPanel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical"> + <Button + android:id="@+id/vertical_allow_button" + style="@style/Widget.WearDiag.Button"/> - <Button - android:id="@+id/vertical_deny_button" - style="@style/Widget.WearDiag.Button"/> + <Button + android:id="@+id/vertical_deny_button" + style="@style/Widget.WearDiag.Button"/> - <Button - android:id="@+id/vertical_deny_do_not_ask_again_button" - style="@style/Widget.WearDiag.Button"/> - </LinearLayout> - </FrameLayout> - </FrameLayout> - </LinearLayout> - </ScrollView> -</FrameLayout>
\ No newline at end of file + <Button + android:id="@+id/vertical_deny_do_not_ask_again_button" + style="@style/Widget.WearDiag.Button"/> + </LinearLayout> + </FrameLayout> + </FrameLayout> +</FrameLayout> diff --git a/res/values-round/dimens.xml b/res/values-round/dimens.xml new file mode 100644 index 00000000..c41886c0 --- /dev/null +++ b/res/values-round/dimens.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> + <!-- Dimensions for the Grant permissions Confirmation Dialog --> + <dimen name="conf_diag_button_container_height">96dp</dimen> + <dimen name="conf_diag_2button_margin_side">36dp</dimen> + <dimen name="conf_diag_2button_margin_top">12dp</dimen> + <dimen name="conf_diag_3button_margin_left">36dp</dimen> + <dimen name="conf_diag_3button_margin_bottom">12dp</dimen> + +</resources> diff --git a/res/values-watch/colors.xml b/res/values-watch/colors.xml index 903bfef5..d662f254 100644 --- a/res/values-watch/colors.xml +++ b/res/values-watch/colors.xml @@ -26,4 +26,7 @@ <!-- Copied from wearable support --> <color name="circular_button_disabled">#757575</color> + + <!-- Copied from wearable Clockwork Settings --> + <color name="cw_dark_gray">#424242</color> </resources> diff --git a/res/values-watch/dimens.xml b/res/values-watch/dimens.xml index 29a65fdc..9f484d3a 100644 --- a/res/values-watch/dimens.xml +++ b/res/values-watch/dimens.xml @@ -22,7 +22,12 @@ <dimen name="action_dialog_z">16dp</dimen> - <!-- Confirmation Dialog --> + <!-- Dimensions for the Grant permissions Confirmation Dialog --> <dimen name="conf_diag_floating_height">16dp</dimen> + <dimen name="conf_diag_button_container_height">72dp</dimen> + <dimen name="conf_diag_2button_margin_side">16dp</dimen> + <dimen name="conf_diag_2button_margin_top">9dp</dimen> + <dimen name="conf_diag_3button_margin_left">16dp</dimen> + <dimen name="conf_diag_3button_margin_bottom">9dp</dimen> </resources> diff --git a/res/values-watch/themes.xml b/res/values-watch/themes.xml index 7a27bf7c..b392c5c1 100644 --- a/res/values-watch/themes.xml +++ b/res/values-watch/themes.xml @@ -16,13 +16,14 @@ --> <resources> - <style name="Settings" parent="Theme.Leanback"> + <style name="Settings" parent="@android:style/Theme.DeviceDefault.NoActionBar"> <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Permissions</item> + <item name="android:windowBackground">@color/cw_dark_gray</item> + <item name="android:colorBackground">@color/cw_dark_gray</item> </style> - <style name="GrantPermissions" parent="Theme.Leanback"> + <style name="GrantPermissions" parent="Settings"> <item name="android:windowIsFloating">true</item> - <item name="android:windowAnimationStyle">@style/Animation.Snackbar</item> <item name="android:windowElevation">@dimen/action_dialog_z</item> </style> @@ -39,11 +40,6 @@ <item name="android:lineSpacingMultiplier">1.221</item> </style> - <style name="Animation.Snackbar" parent="@android:style/Animation"> - <item name="android:windowEnterAnimation">@anim/snackbar_enter</item> - <item name="android:windowExitAnimation">@anim/snackbar_exit</item> - </style> - <!-- Copied from WearableSupport lib --> <style name="TextAppearance.WearDiag" parent="android:TextAppearance.Medium"> <item name="android:textColor">#FFFFFF</item> |