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

Commit 6fc67f22 authored by Anton Potapov's avatar Anton Potapov
Browse files

Update Device Controls API layout

 - choose items spacing depending on the screen size
 - add panel-like background for Device Controls
 - fix margins and paddings

I've attached the screenshots to the bug

Fixes: 273388668
Test: manual on foldable and tablet.
Change-Id: I9c6ea44722d306a0f8c37ab4008617dd0b4f8ffc
parent 7bcdf0c0
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2023 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/transparent" />
    <size
        android:width="@dimen/control_list_horizontal_spacing"
        android:height="@dimen/control_list_vertical_spacing" />
</shape>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -15,6 +15,6 @@
-->
<inset
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/controls_list_divider"
    android:drawable="@drawable/global_actions_list_divider"
    android:insetRight="@dimen/control_spinner_padding_horizontal"
    android:insetLeft="@dimen/control_spinner_padding_horizontal" />
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
    android:focusable="true"
    android:screenReaderFocusable="true"
    android:stateListAnimator="@anim/control_state_list_animator"
    android:layout_marginStart="@dimen/control_spacing"
    android:background="@drawable/control_background">

    <ImageView
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2023 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/controls_list"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:divider="@drawable/controls_list_divider"
    android:orientation="vertical"
    android:showDividers="middle" />
 No newline at end of file
Loading