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

Commit d4c35ea3 authored by LuK1337's avatar LuK1337
Browse files

LineageParts: Slightly improve package list dialog style

* Add 16dp top padding,
* Make app icon smaller,
* Set more fitting text appearance style,
* Remove divider.

Change-Id: I5d77f83215292f2145e4c2bbeb177dd996f08635
parent 25d4bbea
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@

    <ImageView
        android:id="@android:id/icon"
        android:layout_width="44dip"
        android:layout_height="44dip"
        android:layout_width="36dip"
        android:layout_height="36dip"
        android:layout_marginStart="6dip"
        android:layout_marginEnd="6dip"
        android:layout_gravity="center"
@@ -47,7 +47,7 @@
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textAppearance="?android:attr/textAppearanceListItem"
            android:ellipsize="marquee"
            android:fadingEdge="horizontal" />

@@ -56,7 +56,7 @@
            android:layout_height="wrap_content"
            android:layout_below="@android:id/title"
            android:layout_alignStart="@android:id/title"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
            android:maxLines="2" />

    </RelativeLayout>
+2 −0
Original line number Diff line number Diff line
@@ -62,5 +62,7 @@
    <dimen name="trust_logo_horizontal_margin">40dp</dimen>
    <dimen name="trust_logo_height">-2px</dimen>
    <dimen name="trust_logo_width">-1px</dimen>

    <dimen name="package_list_padding_top">16dp</dimen>
</resources>
+6 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2012 The CyanogenMod Project
 *               2017-2020 The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -523,8 +524,13 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
        final Dialog dialog;
        switch (id) {
            case DIALOG_APPS:
                Resources res = getResources();
                int paddingTop = res.getDimensionPixelOffset(R.dimen.package_list_padding_top);

                final ListView list = new ListView(getActivity());
                list.setAdapter(mPackageAdapter);
                list.setDivider(null);
                list.setPadding(0, paddingTop, 0, 0);

                builder.setTitle(R.string.choose_app);
                builder.setView(list);
+7 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2012 The CyanogenMod Project
 *               2017-2020 The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -23,6 +24,7 @@ import android.content.DialogInterface;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.ContextMenu;
@@ -252,8 +254,13 @@ public class AppGroupConfig extends SettingsPreferenceFragment
        final Dialog dialog;
        switch (id) {
            case DIALOG_APPS:
                Resources res = getResources();
                int paddingTop = res.getDimensionPixelOffset(R.dimen.package_list_padding_top);

                final ListView list = new ListView(getActivity());
                list.setAdapter(mAppAdapter);
                list.setDivider(null);
                list.setPadding(0, paddingTop, 0, 0);
                builder.setTitle(R.string.profile_choose_app);
                builder.setView(list);
                dialog = builder.create();