SwitchPreferenceCompat

Additional

Language
Java
Version
N/A
Created
Nov 18, 2014
Updated
May 31, 2017 (Retired)
Owner
Andrew Chen (yongjhih)
Contributors
Andrew Chen (yongjhih)
Fernando García Álvarez (fercarcedo)
Pedro Cardoso (smeegoan)
3
Activity
Badge
Generate
Download
Source code

Advertisement

SwitchPreferenceCompat (Deprecated)

Use support-v7-preferences instead

Allow easy to use SwitchCompat as preference.

Usage

<CheckBox
    android:key="example_checkbox"
    android:title="@string/pref_title_example"
    android:summary="@string/pref_description_example"
    android:defaultValue="true" />

to

<com.cgollner.unclouded.preferences.SwitchPreferenceCompat
    android:key="example_checkbox"
    android:title="@string/pref_title_example"
    android:summary="@string/pref_description_example"
    android:defaultValue="true" />

Installation

build.gradle:

dependencies {
    compile 'com.infstory:switch-preference-compat:1.0.+'
}

Requirement

  • Theme.AppCompat

build.gradle:

dependencies {
    compile 'com.android.support:appcompat-v7:21.+'
}

Credit

  • @ChristianGollner

This SwitchPreferenceCompat is imported from https://plus.google.com/+ChristianGollner/posts/badausxo1J6