Prefs+ Parent

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Лицензия

Лицензия

Группа

Группа

com.mapzen.android
Идентификатор

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

prefs-plus-parent
Последняя версия

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

1.0.0
Дата

Дата

Тип

Тип

pom
Описание

Описание

Prefs+ Parent
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Организация-разработчик

Организация-разработчик

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

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

http://github.com/mapzen/prefs-plus

Скачать prefs-plus-parent

Имя Файла Размер
prefs-plus-parent-1.0.0.pom 2 KB
Обзор

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

<!-- https://jarcasting.com/artifacts/com.mapzen.android/prefs-plus-parent/ -->
<dependency>
    <groupId>com.mapzen.android</groupId>
    <artifactId>prefs-plus-parent</artifactId>
    <version>1.0.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.mapzen.android/prefs-plus-parent/
implementation 'com.mapzen.android:prefs-plus-parent:1.0.0'
// https://jarcasting.com/artifacts/com.mapzen.android/prefs-plus-parent/
implementation ("com.mapzen.android:prefs-plus-parent:1.0.0")
'com.mapzen.android:prefs-plus-parent:pom:1.0.0'
<dependency org="com.mapzen.android" name="prefs-plus-parent" rev="1.0.0">
  <artifact name="prefs-plus-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.mapzen.android', module='prefs-plus-parent', version='1.0.0')
)
libraryDependencies += "com.mapzen.android" % "prefs-plus-parent" % "1.0.0"
[com.mapzen.android/prefs-plus-parent "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

  • prefs-plus
  • prefs-plus-demo

Prefs+

An extension for Android preferences that creates additional preference types including EditIntPreference, EditFloatPreference, and IntListPreference.

Values entered by the user are validated, parsed, and stored as the correct primitive type in SharedPreferences.

The current value is displayed in the summary (subtitle) of each preference view.

This project also provides an extended version of EditTextPreference called EditTextPlusPreference that displays the current value in the summary for string preferences too.

Usage

preferences.xml

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

    <com.mapzen.prefsplus.EditIntPreference
        android:key="@string/integer_key"
        android:title="Integer"
        android:dialogTitle="Enter an integer value"
        android:defaultValue="42" />

    <com.mapzen.prefsplus.EditFloatPreference
        android:key="@string/float_key"
        android:title="Float"
        android:dialogTitle="Enter a float value"
        android:defaultValue="3.14159" />

    <com.mapzen.prefsplus.IntListPreference
        android:key="@string/integer_list_key"
        android:title="Integer List"
        android:dialogTitle="Select from the following list"
        android:entries="@array/int_list_entries"
        android:entryValues="@array/int_list_values"
        android:defaultValue="1" />

    <com.mapzen.prefsplus.EditTextPlusPreference
        android:key="@string/text_key"
        android:title="Text"
        android:dialogTitle="Enter a string"
        android:defaultValue="default" />

</PreferenceScreen>

PreferenceFragment

PreferenceFragment

EditIntPreference

EditIntPreference

EditFloatPreference

EditFloatPreference

IntListPreference

IntListPreference

EditTextPlusPreference

EditTextPlusPreference

Install

Download Jar

Download the latest JAR.

Maven

Include dependency using Maven.

<dependency>
  <groupId>com.mapzen.android</groupId>
  <artifactId>prefs-plus</artifactId>
  <version>1.0.0</version>
</dependency>

Gradle

Include dependency using Gradle.

compile 'com.mapzen.android:prefs-plus:1.0.0'
com.mapzen.android

Mapzen

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

Версия
1.0.0