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

Commit 91e590de authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Rename `buttonSize` to `buttonPreferenceSize`." into main

parents f4efdb06 8049e839
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2024 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.
-->

<resources>
    <declare-styleable name="ButtonPreference">
        <attr name="buttonType" format="enum">
            <enum name="filled" value="0"/>
            <enum name="tonal" value="1"/>
            <enum name="outline" value="2"/>
        </attr>
        <attr name="buttonSize" format="enum">
            <enum name="normal" value="0"/>
            <enum name="large" value="1"/>
            <enum name="extra" value="2"/>
        </attr>
    </declare-styleable>
</resources>
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -18,12 +18,12 @@
<resources>
    <declare-styleable name="ButtonPreference">
        <attr name="android:gravity" />
        <attr name="buttonType" format="enum">
        <attr name="buttonPreferenceType" format="enum">
            <enum name="filled" value="0"/>
            <enum name="tonal" value="1"/>
            <enum name="outline" value="2"/>
        </attr>
        <attr name="buttonSize" format="enum">
        <attr name="buttonPreferenceSize" format="enum">
            <enum name="normal" value="0"/>
            <enum name="large" value="1"/>
            <enum name="extra" value="2"/>
+2 −2
Original line number Diff line number Diff line
@@ -137,8 +137,8 @@ public class ButtonPreference extends Preference {
            mGravity = a.getInt(R.styleable.ButtonPreference_android_gravity, Gravity.START);

            if (SettingsThemeHelper.isExpressiveTheme(context)) {
                int type = a.getInt(R.styleable.ButtonPreference_buttonType, 0);
                int size = a.getInt(R.styleable.ButtonPreference_buttonSize, 0);
                int type = a.getInt(R.styleable.ButtonPreference_buttonPreferenceType, 0);
                int size = a.getInt(R.styleable.ButtonPreference_buttonPreferenceSize, 0);
                resId = ButtonStyle.getLayoutId(type, size);
            }
            a.recycle();