Bouncer - Portrait user switcher tweaks
The numpad and icon were too close to the edges. Align better with specs. Also fix ellipsized long names overlapping the down arrow. Fixes: 222110137 Test: manual - use tablet in portrait and launch bouncer Change-Id: I6a2782ad270376f567c306bef2eec3baf6039908
This commit is contained in:
@@ -17,10 +17,8 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||
android:paddingMode="stack"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="44dp"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp">
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?androidprv:attr/colorSurface" />
|
||||
|
||||
@@ -26,4 +26,6 @@
|
||||
|
||||
<!-- The size of PIN text in the PIN unlock method. -->
|
||||
<integer name="scaled_password_text_size">26</integer>
|
||||
|
||||
<dimen name="bouncer_user_switcher_y_trans">@dimen/status_bar_height</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -117,6 +117,8 @@
|
||||
<dimen name="bouncer_user_switcher_popup_divider_height">4dp</dimen>
|
||||
<dimen name="bouncer_user_switcher_item_padding_vertical">10dp</dimen>
|
||||
<dimen name="bouncer_user_switcher_item_padding_horizontal">12dp</dimen>
|
||||
<dimen name="bouncer_user_switcher_header_padding_end">44dp</dimen>
|
||||
<dimen name="bouncer_user_switcher_y_trans">0dp</dimen>
|
||||
|
||||
<!-- 2 * the margin + size should equal the plus_margin -->
|
||||
<dimen name="user_switcher_icon_large_margin">16dp</dimen>
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
<style name="Bouncer.UserSwitcher.Spinner.Header">
|
||||
<item name="android:background">@drawable/bouncer_user_switcher_header_bg</item>
|
||||
<item name="android:textSize">@dimen/bouncer_user_switcher_header_text_size</item>
|
||||
<item name="android:paddingEnd">@dimen/bouncer_user_switcher_header_padding_end</item>
|
||||
</style>
|
||||
|
||||
<style name="Bouncer.UserSwitcher.Spinner.Item">
|
||||
|
||||
@@ -19,4 +19,5 @@
|
||||
<dimen name="status_view_margin_horizontal">62dp</dimen>
|
||||
<dimen name="keyguard_clock_top_margin">40dp</dimen>
|
||||
<dimen name="keyguard_status_view_bottom_margin">40dp</dimen>
|
||||
<dimen name="bouncer_user_switcher_y_trans">20dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -24,4 +24,5 @@
|
||||
<dimen name="notification_panel_margin_horizontal">120dp</dimen>
|
||||
<dimen name="keyguard_clock_top_margin">80dp</dimen>
|
||||
<dimen name="keyguard_status_view_bottom_margin">80dp</dimen>
|
||||
<dimen name="bouncer_user_switcher_y_trans">90dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -973,18 +973,22 @@ public class KeyguardSecurityContainer extends FrameLayout {
|
||||
|
||||
@Override
|
||||
public void updateSecurityViewLocation() {
|
||||
int yTrans = mResources.getDimensionPixelSize(R.dimen.bouncer_user_switcher_y_trans);
|
||||
|
||||
if (mResources.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
updateViewGravity(mViewFlipper, Gravity.CENTER_HORIZONTAL);
|
||||
updateViewGravity(mUserSwitcherViewGroup, Gravity.CENTER_HORIZONTAL);
|
||||
mUserSwitcherViewGroup.setTranslationY(0);
|
||||
|
||||
mUserSwitcherViewGroup.setTranslationY(yTrans);
|
||||
mViewFlipper.setTranslationY(-yTrans);
|
||||
} else {
|
||||
updateViewGravity(mViewFlipper, Gravity.RIGHT | Gravity.BOTTOM);
|
||||
updateViewGravity(mUserSwitcherViewGroup, Gravity.LEFT | Gravity.CENTER_VERTICAL);
|
||||
|
||||
// Attempt to reposition a bit higher to make up for this frame being a bit lower
|
||||
// on the device
|
||||
int yTrans = mResources.getDimensionPixelSize(R.dimen.status_bar_height);
|
||||
mUserSwitcherViewGroup.setTranslationY(-yTrans);
|
||||
mViewFlipper.setTranslationY(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user