diff options
author | LuK1337 <priv.luk@gmail.com> | 2021-04-27 11:39:23 +0200 |
---|---|---|
committer | Ćukasz Patron <priv.luk@gmail.com> | 2021-05-01 00:05:12 +0200 |
commit | fa3b1bd4105f0dd6a79c19d8e8c5c852fc0a0167 (patch) | |
tree | f5a857aff4cd3d68bd9c42b6c7d7be090a069227 | |
parent | c642690aad0b53dd5a4c2db96f5b808d2ede1525 (diff) |
LineageParts: Add color mode preview from AOSP Settings
Change-Id: Ie69134a7148053e93e3aba528eefd858ae660ccd
-rw-r--r-- | res/drawable-nodpi/color_mode_preview.jpg | bin | 0 -> 1257104 bytes | |||
-rw-r--r-- | res/layout/color_mode_preview.xml | 29 | ||||
-rw-r--r-- | res/values/dimens.xml | 2 | ||||
-rw-r--r-- | res/xml/livedisplay.xml | 5 |
4 files changed, 36 insertions, 0 deletions
diff --git a/res/drawable-nodpi/color_mode_preview.jpg b/res/drawable-nodpi/color_mode_preview.jpg Binary files differnew file mode 100644 index 0000000..804bcf1 --- /dev/null +++ b/res/drawable-nodpi/color_mode_preview.jpg diff --git a/res/layout/color_mode_preview.xml b/res/layout/color_mode_preview.xml new file mode 100644 index 0000000..88b8281 --- /dev/null +++ b/res/layout/color_mode_preview.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2018 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. +--> + +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ImageView + android:layout_width="match_parent" + android:layout_height="@dimen/color_mode_preview_height" + android:scaleType="centerCrop" + android:cropToPadding="true" + android:src="@drawable/color_mode_preview" + android:contentDescription="@null" /> + +</FrameLayout> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 6820040..0f3ed33 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -64,5 +64,7 @@ <dimen name="trust_logo_width">-1px</dimen> <dimen name="package_list_padding_top">16dp</dimen> + + <dimen name="color_mode_preview_height">320dp</dimen> </resources> diff --git a/res/xml/livedisplay.xml b/res/xml/livedisplay.xml index c993fe9..435f809 100644 --- a/res/xml/livedisplay.xml +++ b/res/xml/livedisplay.xml @@ -19,6 +19,11 @@ android:key="livedisplay" android:title="@*lineageos.platform:string/live_display_title"> + <!-- Color mode preview --> + <com.android.settingslib.widget.LayoutPreference + android:layout="@layout/color_mode_preview" + android:selectable="false" /> + <!-- Color profile --> <ListPreference android:key="live_display_color_profile" |