Added custom number picker for api < 11 compatibility
Extracted number picker (non public) from older android source and included it into this project to remain compatible with devices api level < 11. Devices api level > 11 will use native number pickers as the are public facing in the sdk Change-Id: I7cf7cba066b25516e90bd9951f4de7964b7fd613 Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
49
ExaltedDice/res/layout/number_picker.xml
Executable file
49
ExaltedDice/res/layout/number_picker.xml
Executable file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2010-2011, Mike Novak <michael.novakjr@gmail.com>
|
||||
* Copyright 2012, Richard Barrette <rickbarrette@gmail.com>
|
||||
* Copyright 2012, Twenty Codes <twentycodes@gmail.com>
|
||||
* Copyright 2008, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<com.TwentyCode.android.ExaltedDice.NumberPickerButton
|
||||
android:id="@+id/increment"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/timepicker_up_btn" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/timepicker_input"
|
||||
style="?android:attr/textAppearanceLargeInverse"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/timepicker_input"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:singleLine="true"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<com.TwentyCode.android.ExaltedDice.NumberPickerButton
|
||||
android:id="@+id/decrement"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/timepicker_down_btn" />
|
||||
|
||||
</merge>
|
||||
Reference in New Issue
Block a user