Skip to content

Commit

Permalink
SystemUI: Improve bouncer layout
Browse files Browse the repository at this point in the history
Signed-off-by: Anushek Prasal <anushekprasal@gmail.com>
  • Loading branch information
SKULSHADY committed Aug 25, 2023
1 parent 72216f4 commit e35fec4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginTop="30dp">
android:layout_marginTop="24dp">
<TextView
style="@style/Bouncer.UserSwitcher.Spinner.Header"
android:clickable="false"
Expand All @@ -47,7 +47,7 @@
android:gravity="center"
android:layout_gravity="center"
android:textAlignment="center"
android:layout_width="@dimen/bouncer_user_switcher_width"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</com.android.keyguard.KeyguardUserSwitcherAnchor>

Expand Down
12 changes: 6 additions & 6 deletions packages/SystemUI/res-keyguard/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dimen name="keyguard_security_view_top_margin">8dp</dimen>

<!-- Minimum bottom margin under the security view -->
<dimen name="keyguard_security_view_bottom_margin">60dp</dimen>
<dimen name="keyguard_security_view_bottom_margin">30dp</dimen>

<!-- Margin above the ambient indication container -->
<dimen name="ambient_indication_container_margin_top">0dp</dimen>
Expand Down Expand Up @@ -110,19 +110,19 @@
fading out/in. -->
<dimen name="security_shift_animation_translation">120dp</dimen>


<dimen name="bouncer_user_switcher_header_text_size">15sp</dimen>
<dimen name="bouncer_user_switcher_item_text_size">15sp</dimen>
<dimen name="bouncer_user_switcher_item_line_height">20sp</dimen>
<dimen name="bouncer_user_switcher_item_icon_size">24dp</dimen>
<dimen name="bouncer_user_switcher_item_icon_padding">12dp</dimen>
<dimen name="bouncer_user_switcher_width">120dp</dimen>
<dimen name="bouncer_user_switcher_width">248dp</dimen>
<dimen name="bouncer_user_switcher_popup_header_height">12dp</dimen>
<dimen name="bouncer_user_switcher_popup_divider_height">4dp</dimen>
<dimen name="bouncer_user_switcher_popup_items_divider_height">2dp</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_item_padding_vertical">8dp</dimen>
<dimen name="bouncer_user_switcher_item_padding_horizontal">8dp</dimen>
<dimen name="bouncer_user_switcher_header_padding_start">20dp</dimen>
<dimen name="bouncer_user_switcher_header_padding_end">48dp</dimen>
<dimen name="bouncer_user_switcher_y_trans">2dp</dimen>

<!-- 2 * the margin + size should equal the plus_margin -->
Expand Down
2 changes: 2 additions & 0 deletions packages/SystemUI/res-keyguard/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@

<style name="Bouncer.UserSwitcher.Spinner.Header">
<item name="android:background">@drawable/bouncer_user_switcher_header_bg</item>
<item name="android:maxWidth">@dimen/bouncer_user_switcher_width</item>
<item name="android:textSize">@dimen/bouncer_user_switcher_header_text_size</item>
<item name="android:paddingStart">@dimen/bouncer_user_switcher_header_padding_start</item>
<item name="android:paddingEnd">@dimen/bouncer_user_switcher_header_padding_end</item>
</style>

Expand Down

0 comments on commit e35fec4

Please sign in to comment.