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

Commit 97b29980 authored by Anton Potapov's avatar Anton Potapov
Browse files

Update controls panel layout according to the design

Test: Manual on phone, foldable and a tablet
Fixes: 266408709
Change-Id: I5e5a64438e566ebb7ea76c3b02d64f4c4d44b783
parent 050627e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,5 +18,5 @@

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#1F1F1F" />
    <corners android:radius="@dimen/notification_corner_radius" />
    <corners android:radius="@dimen/controls_panel_corner_radius" />
</shape>
 No newline at end of file
+2 −10
Original line number Diff line number Diff line
@@ -15,19 +15,11 @@
     limitations under the License.
-->

<FrameLayout
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/control_detail_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">


    <LinearLayout
        android:id="@+id/global_actions_controls"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingHorizontal="@dimen/controls_padding_horizontal" />

</FrameLayout>
</LinearLayout>
+76 −64
Original line number Diff line number Diff line
@@ -13,72 +13,83 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<merge
    xmlns:android="http://schemas.android.com/apk/res/android">
<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:orientation="vertical"
    tools:parentTag="android.widget.LinearLayout">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
      android:orientation="horizontal"
      android:layout_marginBottom="@dimen/controls_header_bottom_margin">
        android:paddingHorizontal="@dimen/controls_header_horizontal_padding"
        android:layout_marginBottom="@dimen/controls_header_bottom_margin"
        android:orientation="horizontal">

        <!-- make sure the header stays centered in the layout by adding a spacer -->
        <Space
            android:id="@+id/controls_spacer"
        android:layout_width="@dimen/controls_header_menu_size"
            android:layout_width="@dimen/controls_header_menu_button_size"
            android:layout_height="1dp"
            android:visibility="gone" />

        <ImageView
            android:id="@+id/controls_close"
            android:layout_width="@dimen/controls_header_menu_button_size"
            android:layout_height="@dimen/controls_header_menu_button_size"
            android:layout_gravity="center_vertical"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/accessibility_desc_close"
            android:padding="12dp"
            android:src="@drawable/ic_close"
        android:background="?android:attr/selectableItemBackgroundBorderless"
            android:tint="@color/control_primary_text"
        android:layout_width="@dimen/controls_header_menu_size"
        android:layout_height="@dimen/controls_header_menu_size"
        android:padding="12dp"
        android:visibility="gone" />
            android:visibility="gone"
            tools:visibility="visible" />

        <!-- need to keep this outer view in order to have a correctly sized anchor
             for the dropdown menu, as well as dropdown background in the right place -->
        <LinearLayout
            android:id="@+id/controls_header"
        android:orientation="horizontal"
            android:layout_width="0dp"
        android:layout_weight="1"
        android:minHeight="48dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
        android:gravity="center">
            android:layout_weight="1"
            android:gravity="center"
            android:minHeight="48dp"
            android:orientation="horizontal">

            <TextView
          style="@style/Control.Spinner.Header"
          android:clickable="false"
                android:id="@+id/app_or_structure_spinner"
                style="@style/Control.Spinner.Header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
          android:layout_gravity="center" />
                android:layout_gravity="center"
                android:clickable="false"
                tools:text="Test app" />
        </LinearLayout>

        <ImageView
            android:id="@+id/controls_more"
        android:src="@drawable/ic_more_vert"
        android:layout_width="@dimen/controls_header_menu_size"
        android:layout_height="@dimen/controls_header_menu_size"
        android:padding="12dp"
        android:tint="@color/control_more_vert"
        android:layout_gravity="center"
            android:layout_width="@dimen/controls_header_menu_button_size"
            android:layout_height="@dimen/controls_header_menu_button_size"
            android:layout_gravity="center_vertical"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/accessibility_menu"
        android:background="?android:attr/selectableItemBackgroundBorderless" />
            android:padding="12dp"
            android:src="@drawable/ic_more_vert"
            android:tint="@color/control_more_vert" />
    </LinearLayout>

    <ScrollView
        android:id="@+id/controls_scroll_view"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginHorizontal="@dimen/controls_content_margin_horizontal"
        android:layout_weight="1"
        android:orientation="vertical"
        android:clipChildren="true"
        android:orientation="vertical"
        android:paddingHorizontal="16dp"
        android:scrollbars="none">

        <include layout="@layout/global_actions_controls_list_view" />

    </ScrollView>
@@ -87,8 +98,9 @@
        android:id="@+id/controls_panel"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginHorizontal="@dimen/controls_content_margin_horizontal"
        android:layout_weight="1"
        android:background="@drawable/controls_panel_background"
        android:visibility="gone"
      />
        tools:visibility="visible" />
</merge>
+2 −1
Original line number Diff line number Diff line
@@ -64,5 +64,6 @@

    <dimen name="qs_panel_padding_top">@dimen/qqs_layout_margin_top</dimen>

    <dimen name="controls_padding_horizontal">16dp</dimen>
    <dimen name="controls_header_horizontal_padding">12dp</dimen>
    <dimen name="controls_content_margin_horizontal">16dp</dimen>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -87,4 +87,7 @@

    <!-- Biometric Auth pattern view size, better to align keyguard_security_width -->
    <dimen name="biometric_auth_pattern_view_size">348dp</dimen>

    <dimen name="controls_header_horizontal_padding">12dp</dimen>
    <dimen name="controls_content_margin_horizontal">24dp</dimen>
</resources>
Loading