Prefs+

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

Лицензия

Лицензия

Группа

Группа

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

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

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

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

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

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

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

Mapzen

Скачать prefs-plus

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

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

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
com.google.android : android jar 4.1.1.4

test (4)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
org.robolectric : robolectric jar 2.4
com.squareup : fest-android jar 1.0.8
com.android.support » support-v4 jar 19.0.1

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

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

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