From 513f83dfc21f11e5c49ba9f27713c6e04f439c86 Mon Sep 17 00:00:00 2001 From: mrbimc Date: Sat, 13 Jun 2015 13:47:12 +0300 Subject: [PATCH] Support for referenced resources(thanks, @krage!) --- .idea/runConfigurations.xml | 12 ++++++++++++ README.md | 11 +++++++++-- build.gradle | 2 +- library/build.gradle | 8 ++++---- library/library.iml | 20 +++++++++++--------- sample/sample.iml | 16 +++++++++------- 6 files changed, 46 insertions(+), 23 deletions(-) create mode 100644 .idea/runConfigurations.xml diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 8acb05b..9f3d149 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Reference namespace on top of your preferences layout file: xmlns:sample="http://schemas.android.com/apk/res-auto"> ```` -Now you can use this view in your preferences layout, just like any other normal preference: +Now you can use this view in your preferences layout, just like any other normal preference. ```xml ```` -As you can see, lib provides 4 custom attributes(minValue, maxValue, interval and measurementUnit). +As you can see, lib provides 4 custom attributes(minValue, maxValue, interval and measurementUnit). +measurementUnit is should be String or a reference to a String (measurementUnit="%" or measurementUnit="@string/my_preference_unit"). +Every other attribute should be an Integer or reference to an Integer resource (interval="@integer/my_preference_interval" or interval="10"). Use them to define look and desired behavior of your preference. #Known bugs and planned features @@ -42,6 +44,11 @@ Use them to define look and desired behavior of your preference. 2. No support of RTL yet. 3. Small bug: It takes 2 taps on seekbar value indicator to open up the keyboard. +# Collaborators +I'd really want to thank: + +* [krage](https://github.com/krage) for adding support for referenced resources. + #Licence Lib is licenced under *MIT licence*, so you can do whatever you want with it. I'd highly recommend to push changes back to make it cooler :D diff --git a/build.gradle b/build.gradle index 1dfa954..afb6603 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.2.2' + classpath 'com.android.tools.build:gradle:1.2.3' } } diff --git a/library/build.gradle b/library/build.gradle index 0e3f41a..652ff87 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -7,19 +7,19 @@ android { defaultConfig { minSdkVersion 11 targetSdkVersion 22 - versionCode 2 - versionName "0.6" + versionCode 3 + versionName "0.7" } } dependencies { - compile 'com.android.support:appcompat-v7:22.1.1' + compile 'com.android.support:appcompat-v7:22.2.0' } ext { PUBLISH_GROUP_ID = 'com.pavelsikun' PUBLISH_ARTIFACT_ID = 'material-seekbar-preference' - PUBLISH_VERSION = '0.6' + PUBLISH_VERSION = '0.7' } apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle' \ No newline at end of file diff --git a/library/library.iml b/library/library.iml index e80f00d..7dc81df 100644 --- a/library/library.iml +++ b/library/library.iml @@ -12,10 +12,12 @@