new widgets

This commit is contained in:
serso
2011-09-19 22:50:01 +04:00
parent 7aec0d0c3e
commit 0e2a85ae9e
14 changed files with 361 additions and 187 deletions

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
~ For more information, please, contact se.solovyev@gmail.com
~ or visit http://se.solovyev.org
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<org.solovyev.android.view.widgets.NumberPickerButton android:id="@+id/increment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/timepicker_up_btn" />
<EditText android:id="@+id/timepicker_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
style="?android:attr/textAppearanceLargeInverse"
android:textColor="@android:color/primary_text_light"
android:textSize="30sp"
android:background="@drawable/timepicker_input" />
<org.solovyev.android.view.widgets.NumberPickerButton android:id="@+id/decrement"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/timepicker_down_btn" />
</merge>

View File

@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="DragButton">
<attr name="textUp" format="string" />
<attr name="textDown" format="string" />
</declare-styleable>
<declare-styleable name="DragButton">
<attr name="textUp" format="string"/>
<attr name="textDown" format="string"/>
</declare-styleable>
<declare-styleable name="NumberRangeSeekBar">
<attr name="min" format="string"/>
<attr name="max" format="string"/>
</declare-styleable>
</resources>

View File

@@ -1,15 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:a="http://schemas.android.com/apk/res/android">
<PreferenceScreen xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:range="http://schemas.android.com/apk/res/org.solovyev.android.calculator">
<PreferenceCategory a:title="@string/c_prefs_drag_button_category">
<!-- <org.solovyev.android.view.prefs.SeekBarPreference a:key="duration"
a:title="Duration of something"
a:summary="How long something will last"
a:dialogMessage="Something duration"
a:defaultValue="5"
a:text=" minutes"
a:max="60"/>-->
<org.solovyev.android.view.prefs.SeekBarPreference a:key="duration"
a:title="Duration of something"
a:summary="How long something will last"
a:dialogMessage="Something duration"
a:defaultValue="5"
a:text=" minutes"
a:max="60"/>
<org.solovyev.android.view.prefs.IntegerRangeSeekBarPreference
a:key="touch.duration"
a:title="Duration of something"
a:summary="How long something will last"
a:dialogMessage="Something duration"
a:defaultValue="5"
a:text=" minutes"
range:min="10"
range:max="600"/>
</PreferenceCategory>
</PreferenceScreen>