Update wallet button size for large screens, reduce keyguard bottom text margin
The distortion of the wallet button occurs because keyguard affordance width/height are overridden with different values on larger screens (sw600dp) and width is greater than height. Wallet button should have the same size on all screen sizes, I created a separate pair of resources for this button. Also updated keyguard bottom text margin, it should be lowered so it is horizontally aligned with the wallet button and the margin should be the same across all screen sizes. Test: https://screenshot.googleplex.com/3BFdcFMWRLLv482.png (small screens) Test: https://screenshot.googleplex.com/9d7oZrvAiwY7Vi2.png (large screens) Bug: 189116030 Change-Id: Iac822e657e44d9664c616abe67096e48d594d7c0
This commit is contained in:
@@ -80,8 +80,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wallet_button"
|
||||
android:layout_height="@dimen/keyguard_affordance_height"
|
||||
android:layout_width="@dimen/keyguard_affordance_width"
|
||||
android:layout_height="@dimen/keyguard_affordance_wallet_height"
|
||||
android:layout_width="@dimen/keyguard_affordance_wallet_width"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:scaleType="center"
|
||||
android:tint="?android:attr/textColorPrimary"
|
||||
|
||||
@@ -68,8 +68,6 @@
|
||||
phone hints. -->
|
||||
<dimen name="edge_tap_area_width">80dp</dimen>
|
||||
|
||||
<dimen name="keyguard_indication_margin_bottom">90dp</dimen>
|
||||
|
||||
<!-- Margin on the right side of the system icon group on Keyguard. -->
|
||||
<dimen name="system_icons_keyguard_padding_end">2dp</dimen>
|
||||
|
||||
|
||||
@@ -892,6 +892,10 @@
|
||||
<!-- The width/height of the keyguard bottom area icon view on keyguard. -->
|
||||
<dimen name="keyguard_affordance_height">48dp</dimen>
|
||||
<dimen name="keyguard_affordance_width">48dp</dimen>
|
||||
|
||||
<dimen name="keyguard_affordance_wallet_height">48dp</dimen>
|
||||
<dimen name="keyguard_affordance_wallet_width">48dp</dimen>
|
||||
|
||||
<dimen name="keyguard_affordance_horizontal_offset">32dp</dimen>
|
||||
<dimen name="keyguard_affordance_vertical_offset">32dp</dimen>
|
||||
<!-- Value should be at least sum of 'keyguard_affordance_width' +
|
||||
@@ -903,7 +907,7 @@
|
||||
<dimen name="keyguard_lock_width">42dp</dimen>
|
||||
<dimen name="keyguard_lock_padding">20dp</dimen>
|
||||
|
||||
<dimen name="keyguard_indication_margin_bottom">40dp</dimen>
|
||||
<dimen name="keyguard_indication_margin_bottom">32dp</dimen>
|
||||
|
||||
<!-- The text size for battery level -->
|
||||
<dimen name="battery_level_text_size">12sp</dimen>
|
||||
|
||||
@@ -368,8 +368,8 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
|
||||
updateLeftAffordanceIcon();
|
||||
|
||||
lp = mWalletButton.getLayoutParams();
|
||||
lp.width = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_width);
|
||||
lp.height = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_height);
|
||||
lp.width = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_wallet_width);
|
||||
lp.height = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_wallet_width);
|
||||
mWalletButton.setLayoutParams(lp);
|
||||
|
||||
mIndicationPadding = getResources().getDimensionPixelSize(
|
||||
|
||||
Reference in New Issue
Block a user