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

Commit 953e3900 authored by Raff Tsai's avatar Raff Tsai
Browse files

Change dialog text styles

Fixes: 126890487
Test: visual
Change-Id: I21b4264fd6b5c7f5fb79c3669bae366513c1ec65
parent 0fa2651d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -303,6 +303,11 @@
        <item name="android:textSize">16sp</item>
    </style>

    <style name="TextAppearance.DialogMessage"
           parent="@*android:style/TextAppearance.DeviceDefault.Body1">
        <item name="android:textSize">16sp</item>
    </style>

    <style name="SuggestionCardText">
        <item name="android:textAlignment">viewStart</item>
    </style>
+4 −1
Original line number Diff line number Diff line
@@ -128,8 +128,11 @@
        <!-- Redefine the ActionBar style for contentInsetStart -->
        <item name="android:actionBarStyle">@style/Widget.ActionBar</item>

        <!-- copied from Theme.DeviceDefault.Light.Dialog.Alert -->
        <!-- copied from Theme.DeviceDefault.Dialog.Alert -->
        <item name="dialogCornerRadius">@*android:dimen/config_dialogCornerRadius</item>
        <item name="android:windowTitleStyle">@*android:style/DialogWindowTitle.DeviceDefault</item>
        <item name="android:textAppearanceMedium">@style/TextAppearance.DialogMessage</item>
        <item name="buttonBarButtonStyle">@*android:style/Widget.DeviceDefault.Button.ButtonBar.AlertDialog</item>
    </style>

    <style name="Theme.ConfirmDeviceCredentials" parent="Theme.SubSettings">
+3 −4
Original line number Diff line number Diff line
@@ -157,8 +157,8 @@ public class RestrictedListPreference extends CustomListPreference {
        return null;
    }

    protected ListAdapter createListAdapter() {
        return new RestrictedArrayAdapter(getContext(), getEntries(),
    protected ListAdapter createListAdapter(Context context) {
        return new RestrictedArrayAdapter(context, getEntries(),
                getSelectedValuePos());
    }

@@ -172,10 +172,9 @@ public class RestrictedListPreference extends CustomListPreference {
    @Override
    protected void onPrepareDialogBuilder(Builder builder,
            DialogInterface.OnClickListener listener) {
        builder.setAdapter(createListAdapter(), listener);
        builder.setAdapter(createListAdapter(builder.getContext()), listener);
    }


    public class RestrictedArrayAdapter extends ArrayAdapter<CharSequence> {
        private final int mSelectedIndex;
        public RestrictedArrayAdapter(Context context, CharSequence[] objects, int selectedIndex) {
+2 −7
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.util.AttributeSet;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ListAdapter;
import android.widget.ListView;

import androidx.appcompat.app.AlertDialog;
@@ -78,7 +77,8 @@ public class NotificationLockscreenPreference extends RestrictedListPreference {
            DialogInterface.OnClickListener innerListener) {

        mListener = new Listener(innerListener);
        builder.setSingleChoiceItems(createListAdapter(), getSelectedValuePos(), mListener);
        builder.setSingleChoiceItems(createListAdapter(builder.getContext()), getSelectedValuePos(),
                mListener);
        mShowRemoteInput = getEntryValues().length == 3;
        mAllowRemoteInput = Settings.Secure.getInt(getContext().getContentResolver(),
                Settings.Secure.LOCK_SCREEN_ALLOW_REMOTE_INPUT, 0) != 0;
@@ -116,11 +116,6 @@ public class NotificationLockscreenPreference extends RestrictedListPreference {
        mListener.setView(panel);
    }

    @Override
    protected ListAdapter createListAdapter() {
        return new RestrictedArrayAdapter(getContext(), getEntries(), -1);
    }

    @Override
    protected void onDialogClosed(boolean positiveResult) {
        super.onDialogClosed(positiveResult);