PreferenceFragment Library

Unofficial PreferenceFragment compatibility layer for Android 1.6 and up.

Лицензия

Лицензия

Группа

Группа

cn.kongnannan
Идентификатор

Идентификатор

preferencefragment
Последняя версия

Последняя версия

1.1
Дата

Дата

Тип

Тип

aar
Описание

Описание

PreferenceFragment Library
Unofficial PreferenceFragment compatibility layer for Android 1.6 and up.
Ссылка на сайт

Ссылка на сайт

https://github.com/kongnanlive/PreferenceFragment
Система контроля версий

Система контроля версий

https://github.com/kongnanlive/PreferenceFragment

Скачать preferencefragment

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/cn.kongnannan/preferencefragment/ -->
<dependency>
    <groupId>cn.kongnannan</groupId>
    <artifactId>preferencefragment</artifactId>
    <version>1.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/cn.kongnannan/preferencefragment/
implementation 'cn.kongnannan:preferencefragment:1.1'
// https://jarcasting.com/artifacts/cn.kongnannan/preferencefragment/
implementation ("cn.kongnannan:preferencefragment:1.1")
'cn.kongnannan:preferencefragment:aar:1.1'
<dependency org="cn.kongnannan" name="preferencefragment" rev="1.1">
  <artifact name="preferencefragment" type="aar" />
</dependency>
@Grapes(
@Grab(group='cn.kongnannan', module='preferencefragment', version='1.1')
)
libraryDependencies += "cn.kongnannan" % "preferencefragment" % "1.1"
[cn.kongnannan/preferencefragment "1.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.android.support » appcompat-v7 jar 20.0.0

Модули Проекта

Данный проект не имеет модулей.

###DEPRECATED

PreferenceFragment is deprecated. You can try https://github.com/jenzz/Android-MaterialPreference https://github.com/AndroidDeveloperLB/MaterialPreferenceLibrary https://github.com/Gericop/Android-Support-Preference-V7-Fix https://github.com/michael-rapp/AndroidPreferenceActivity

Thanks for all your support!

###Support PreferenceFragment

非官方PreferenceFragment兼容库,支持Android2.1及更高版本。

Unofficial PreferenceFragment compatibility layer for Android 2.1 and up.

###About the status of the library

弥补官方没有PreferenceFragment兼容库

我会一直维护它的
I will always maintain its

计划支持 Android L Material Design
Plans to support Android L Material Design


###Demo

二维码 Dimensional Code

Download Demo

###Usage

Add the following config in your build.gradle:

dependencies {
   compile 'com.android.support:appcompat-v7:20.0.0'
   compile 'cn.kongnannan:preferencefragment:1.1@aar'
}

Use it in your own code:

  import android.support.v4.preference.CheckBoxPreference;
  import android.support.v4.preference.EditTextPreference;
  import android.support.v4.preference.ListPreference;
  import android.support.v4.preference.PreferenceActivity;
  import android.support.v4.preference.PreferenceCategory;
  import android.support.v4.preference.PreferenceScreen;
  import android.support.v4.preference.SwitchPreference;
<PreferenceScreen xmlns:android1="http://schemas.android.com/apk/res/android"
    xmlns:android="http://schemas.android.com/apk/res-auto" >

    <PreferenceCategory
            android:title="@string/inline_preferences">
            
        <CheckBoxPreference
                android:key="checkbox_preference"
                android:title="@string/title_checkbox_preference"
                android:summary="@string/summary_checkbox_preference" />

        <SwitchPreference
                android:key="checkbox_preference"
                android:title="@string/title_switch_preference"
                android:summary="@string/summary_switch_preference" />

        <SwitchPreference
                android:key="checkbox_preference"
                android:title="@string/title_switch_preference"
                android:summary="@string/summary_switch_preference_yes_no"
                android:switchTextOn = "YES"
                android:switchTextOff = "NO"
                android:defaultValue="true" />
            
    </PreferenceCategory>
    
</PreferenceScreen>

Just extend PreferenceFragment and follow the Settings developer guide like if this layer wasn't even there to begin with.

http://developer.android.com/guide/topics/ui/settings.html

About me:

我来自孔孟之乡,六年代码生涯,略懂java、flex、php、javascript、html5、android等开发语言,热爱移动互联,目前从事Android开发

License

Copyright (c) 2014 Kong Nan

Licensed under the Apache License, Version 2.0

End

这是我自己APP的截图

alt tag

Версии библиотеки

Версия
1.1
1.0