No need to clone it if you really don't want to. You can use it in XML
layot like
<com.android.internal.widget.NumberPicker
android:id="@+id/picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
and then use reflection to set settings:
Object o = findViewById(R.id.picker);
Class c = o.getClass();
try {
Method m = c.getMethod("setRange", int.class, int.class);
m.invoke(o, 0, 9);
} catch (Exception e) {
Log.e("", e.getMessage());
}
It sucks but it works :)
On 28 янв, 20:17, Mark Murphy <[email protected]> wrote:
> Will wrote:
> > Setting a breakpoint when a DatePickerDialog is open on the emulator's
> > screen shows a com.android.internal.widget.NumberPicker for month,
> > year, and date (1numberpickereach for a total of three
> > NumberPickers). It looks like the same widget used for a timepicker;
> > based on the name I'm sure it is.
>
> > Importing android.internal.widget doesn't work. It was worth a shot.
>
> The source to it is probably available on source.android.com. Clone your
> own until they open that one up in the SDK.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---