TTTT55 / Material-You-Preferences

Library replicating the official Material You (MD3) Settings page, for use with Preferences library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android-Preferences-M3

Release Replica of official Settings page for M3, for use with Preferences library

Usage

  1. Gradle:
repositories {

    maven { url 'https://jitpack.io' }

}

dependencies {

    implementation 'com.github.TTTT55:Material-You-Preferences:$latest_version'

}
  1. XML preferences:

Add the desired preferences ( MaterialPreference , MaterialSwitchPreference , MaterialHeaderSwitchPreference , MaterialListPreference , MaterialEditTextPreference ) to your preference XML:

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                  xmlns:app="http://schemas.android.com/apk/res-auto">

  <PreferenceCategory>

    <com.github.tstewart.materialpreferencesfragment.preferences.MaterialPreference

        android:key="preference_one"
        app:icon="@drawable/ic_pref_icon"
        android:summary="@string/preference_summary"
        android:title="@string/preference_title"/>

    ...

  </PreferenceCategory>

</PreferenceScreen>

Note:

To remove dividers between preferences in XML, use the following attributes:

app:allowDividerAbove="false" or app:allowDividerBelow="false"

About

Library replicating the official Material You (MD3) Settings page, for use with Preferences library.


Languages

Language:Java 100.0%