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 (1 number picker each for a total of three
NumberPickers). It looks like the same widget used for a time picker;
based on the name I'm sure it is.
Importing android.internal.widget doesn't work. It was worth a shot.
On Jan 27, 1:02 pm, nyenyec <nyen...@gmail.com> 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 (1 number picker each for a total of three > NumberPickers). It looks like the same widget used for a time picker; > 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!
> 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!
> 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 <mmur...@commonsware.com> 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!
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.
> 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 <mmur...@commonsware.com> 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!
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.
> 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.
> > On 28 янв, 20:17, Mark Murphy <mmur...@commonsware.com> 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!
> 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.
Can the google developers please start bringing these widgets out to
the public API? Something like a number picker widget seems too
common for GUIs that it be kept internal. I believe there was also
the slider widget that was being kept internal.
Of course I'm probably ignorant as to why this has been done this
way. Any chance of being filled in a bit?
~clark
On Feb 10, 6:32 pm, Mark Murphy <mmur...@commonsware.com> wrote:
On Thu, Jan 6, 2011 at 1:53 PM, MerlinBG <Merli...@gbg.bg> wrote: > I see this thread is more than an year old. Any chance to have the > NumberPicker public by now?
> -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubs cribe@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
> On Thu, Jan 6, 2011 at 1:53 PM, MerlinBG <Merli...@gbg.bg> wrote:
>> I see this thread is more than an year old. Any chance to have the >> NumberPicker public by now?
>> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubs cribe@googlegroups.com> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en
> -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubs cribe@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
By public I mean included in the public API - not internal. To reuse it, not to copy/duplicate it. Thanks for the link, I do use Google quite successful :) The question was more like "do we still need to duplicate existing code, or this changed during the year since this topic is posted".
On Thu, Jan 6, 2011 at 11:00 PM, MerlinBG <Merli...@gbg.bg> wrote: > By public I mean included in the public API - not internal. To reuse it, > not to copy/duplicate it. > Thanks for the link, I do use Google quite successful :) The question was > more like "do we still need to duplicate existing code, or this changed > during the year since this topic is posted".
> -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubs cribe@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.