Then how else can this be accomplished?????
On Feb 7, 10:06 pm, Dianne Hackborn <[email protected]> wrote:
> DO NOT DO THIS.
>
> See the word "internal" in there? That means internal. Do not touch. Your
> code will break in the future. In fact some platform engineer just may go
> rename that class for no reason at all and break your code.
>
> 2009/2/4 solomonk <[email protected]>
>
>
>
>
>
> > 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!
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support. All such questions should be posted on public
> forums, where I and others can see and answer them.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---