Files
app_Settings/res/layout/hdr_brightness_preview.xml
Piotr Wilczyński 7529d0f931 Fix layout of HDR brightness setting
- don't use protection_background which has a fixed size
- specify gravity on the images instead of giving them a dp size which makes them larger if display size is increased

Bug: 419775400
Test: manual on device
Flag: com.android.server.display.feature.flags.hdr_brightness_setting
Change-Id: Ifa881e33798885b213fb7631b90e7a51577d0889
2025-06-13 15:36:44 +00:00

65 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/hdr_brightness_setting_preview_background"
android:paddingStart="30dp"
android:paddingTop="15dp"
android:paddingEnd="30dp"
android:paddingBottom="15dp">
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginEnd="10dp"
android:layout_weight="1">
<ImageView android:id="@+id/standard_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:contentDescription="@null" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hdr_brightness_standard_image_label"
android:textColor="?android:attr/textColorPrimary"
android:layout_gravity="center"
android:layout_marginTop="10dp" />
</LinearLayout>
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginStart="10dp"
android:layout_weight="1">
<ImageView android:id="@+id/hdr_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:contentDescription="@null" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hdr_brightness_hdr_image_label"
android:textColor="?android:attr/textColorPrimary"
android:layout_gravity="center"
android:layout_marginTop="10dp" />
</LinearLayout>
</LinearLayout>