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

Commit f06190e7 authored by David Liu's avatar David Liu Committed by Android (Google) Code Review
Browse files

Merge "Added highlighted background support" into main

parents b2de438c 7b0bb6bf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,16 +21,16 @@ import android.content.Intent
import android.os.Bundle
import android.util.Log
import androidx.annotation.XmlRes
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceScreen
import com.android.settingslib.metadata.EXTRA_BINDING_SCREEN_KEY
import com.android.settingslib.metadata.PreferenceScreenBindingKeyProvider
import com.android.settingslib.metadata.PreferenceScreenRegistry
import com.android.settingslib.preference.PreferenceScreenBindingHelper.Companion.bindRecursively
import com.android.settingslib.widget.SettingsBasePreferenceFragment

/** Fragment to display a preference screen. */
open class PreferenceFragment :
    PreferenceFragmentCompat(), PreferenceScreenProvider, PreferenceScreenBindingKeyProvider {
    SettingsBasePreferenceFragment(), PreferenceScreenProvider, PreferenceScreenBindingKeyProvider {

    private var preferenceScreenBindingHelper: PreferenceScreenBindingHelper? = null

+36 −0
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.
  -->

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:colorControlHighlight">
    <item
        android:bottom="16dp"
        android:end="?android:attr/listPreferredItemPaddingEnd"
        android:start="?android:attr/listPreferredItemPaddingStart"
        android:top="2dp">
        <shape
            android:shape="rectangle"
            android:tint="?android:attr/colorAccent">
            <corners
                android:bottomLeftRadius="@dimen/settingslib_preference_corner_radius"
                android:bottomRightRadius="@dimen/settingslib_preference_corner_radius"
                android:topLeftRadius="4dp"
                android:topRightRadius="4dp" />
            <padding android:bottom="16dp" />
            <solid android:color="#42000000" />
        </shape>
    </item>
</ripple>
 No newline at end of file
+30 −0
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.
  -->

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:colorControlHighlight">
    <item
        android:end="?android:attr/listPreferredItemPaddingEnd"
        android:start="?android:attr/listPreferredItemPaddingStart"
        android:top="2dp">
        <shape
            android:shape="rectangle"
            android:tint="?android:attr/colorAccent">
            <corners android:radius="4dp" />
            <solid android:color="#42000000" />
        </shape>
    </item>
</ripple>
 No newline at end of file
+32 −0
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.
  -->

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:colorControlHighlight">
    <item
        android:bottom="16dp"
        android:end="?android:attr/listPreferredItemPaddingEnd"
        android:start="?android:attr/listPreferredItemPaddingStart"
        android:top="2dp">
        <shape
            android:shape="rectangle"
            android:tint="?android:attr/colorAccent">
            <corners android:radius="@dimen/settingslib_preference_corner_radius" />
            <padding android:bottom="16dp" />
            <solid android:color="#42000000" />
        </shape>
    </item>
</ripple>
 No newline at end of file
+35 −0
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.
  -->

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:colorControlHighlight">
    <item
        android:color="?android:attr/colorAccent"
        android:end="?android:attr/listPreferredItemPaddingEnd"
        android:start="?android:attr/listPreferredItemPaddingStart"
        android:top="2dp">
        <shape
            android:shape="rectangle"
            android:tint="?android:attr/colorAccent">
            <corners
                android:bottomLeftRadius="4dp"
                android:bottomRightRadius="4dp"
                android:topLeftRadius="@dimen/settingslib_preference_corner_radius"
                android:topRightRadius="@dimen/settingslib_preference_corner_radius" />
            <solid android:color="#42000000" />
        </shape>
    </item>
</ripple>
 No newline at end of file
Loading