Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f478c7f authored by Matt Pietal's avatar Matt Pietal
Browse files

Controls UI - Marquee + dynamic column count

Make the controls more legible across different displays.

1. Support marquee in the status field to support long strings
2. Adjust margins for different dp devices
3. Dynamically adjust the max number of columns based on fontScale and
screen width in dp

Bug: 152765942
Test: visual, use different display/font sizes

Change-Id: I72665f1164ff30e0a5746adb9fdc89f00edd35d4
parent bc930092
Loading
Loading
Loading
Loading
+6 −15
Original line number Diff line number Diff line
@@ -40,29 +40,20 @@

    <TextView
        android:id="@+id/status"
        android:layout_width="wrap_content"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.Control.Status"
        android:paddingTop="@dimen/control_padding_adjustment"
        android:paddingStart="@dimen/control_status_padding"
        android:clickable="false"
        android:clickable="true"
        android:focusable="false"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:marqueeRepeatLimit = "marquee_forever"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="@+id/icon"
        app:layout_constraintStart_toEndOf="@+id/icon" />


    <TextView
        android:id="@+id/status_extra"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.Control.Status"
        android:paddingTop="@dimen/control_padding_adjustment"
        android:paddingStart="@dimen/control_status_padding"
        android:clickable="false"
        android:focusable="false"
        app:layout_constraintBottom_toBottomOf="@+id/icon"
        app:layout_constraintStart_toEndOf="@+id/status" />

    <TextView
        android:id="@+id/title"
        android:layout_width="match_parent"
+1 −3
Original line number Diff line number Diff line
@@ -67,8 +67,6 @@
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:layout_marginRight="@dimen/global_actions_grid_horizontal_padding"
          android:layout_marginLeft="@dimen/global_actions_grid_horizontal_padding"
      />
    </LinearLayout>
  </com.android.systemui.globalactions.MinHeightScrollView>
+3 −0
Original line number Diff line number Diff line
@@ -31,4 +31,7 @@

    <!-- orientation of the dead zone when touches have recently occurred elsewhere on screen -->
    <integer name="navigation_bar_deadzone_orientation">1</integer>

    <!-- Max number of columns for quick controls area -->
    <integer name="controls_max_columns">4</integer>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -30,5 +30,7 @@
    <dimen name="global_actions_grid_item_icon_side_margin">22dp</dimen>
    <dimen name="global_actions_grid_item_icon_bottom_margin">4dp</dimen>

    <!-- Home Controls -->
    <dimen name="controls_list_side_margin">10dp</dimen>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -26,5 +26,7 @@
         navigation_extra_key_width -->
    <dimen name="navigation_side_padding">40dip</dimen>

    <!-- Home Controls -->
    <dimen name="controls_list_side_margin">12dp</dimen>
</resources>
Loading