Heads-up: Fix up layout for blacklisted/stoplisted app lists

When apps were added to blacklist/stoplist, there was nothing
in place to help things look halfway decent. We added a layout
in order to accomplish a nicer, cleaner looking list.

Before: https://i.imgur.com/7muwWZ7.jpg

After:  https://i.imgur.com/DzgVOjX.jpg

Signed-off-by: calebcabob <calphonic@gmail.com>
Change-Id: Ic853817f7cf1765a282324a23af11f72666e2670
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
calebcabob
2020-03-31 20:08:13 -04:00
committed by Hưng Phan
parent ed637852d0
commit 25cab71ee6
2 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019 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:gravity="center_vertical"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
android:paddingStart="@dimen/switchbar_subsettings_margin_start"
android:paddingEnd="@dimen/switchbar_subsettings_margin_end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:dividerHeight="0dp"
android:clipToPadding="false">
<!-- Icon view for Heads-up BlackListing/StopListing app lists -->
<LinearLayout
android:id="@+id/icon_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start|center_vertical"
android:dividerHeight="0dp"
android:orientation="horizontal">
<com.android.internal.widget.PreferenceImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:maxWidth="26dp"
android:maxHeight="26dp"/>
</LinearLayout>
<!-- Text view for Heads-up BlackListing/StopListing app lists -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:dividerHeight="0dp">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingStart="14dp"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceListItem"
android:textColor="?android:attr/textColorSecondary"
android:textStyle="bold"
android:layout_marginBottom="8dip" />
</RelativeLayout>
</LinearLayout>