Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Reusing the +/- number spinner from TimePickerDialog?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
nyenyec  
View profile  
 More options Jan 27 2009, 1:02 pm
From: nyenyec <nyen...@gmail.com>
Date: Tue, 27 Jan 2009 10:02:31 -0800 (PST)
Local: Tues, Jan 27 2009 1:02 pm
Subject: Reusing the +/- number spinner from TimePickerDialog?
Hi,

Is there an easy way to reuse the number selector with the plus/minus
buttons from TimePickerDialog?

Thanks,
nyenyec


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Will  
View profile  
 More options Jan 27 2009, 10:24 pm
From: Will <sem...@gmail.com>
Date: Tue, 27 Jan 2009 19:24:05 -0800 (PST)
Local: Tues, Jan 27 2009 10:24 pm
Subject: Re: Reusing the +/- number spinner from TimePickerDialog?
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Murphy  
View profile  
 More options Jan 28 2009, 12:17 pm
From: Mark Murphy <mmur...@commonsware.com>
Date: Wed, 28 Jan 2009 12:17:06 -0500
Local: Wed, Jan 28 2009 12:17 pm
Subject: Re: [android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

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!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
solomonk  
View profile  
 More options Feb 4 2009, 12:43 pm
From: solomonk <denis.solone...@gmail.com>
Date: Wed, 4 Feb 2009 09:43:04 -0800 (PST)
Local: Wed, Feb 4 2009 12:43 pm
Subject: Re: Reusing the +/- number spinner from TimePickerDialog?
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 <mmur...@commonsware.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
$§Kalle§$  
View profile  
 More options Feb 7 2009, 6:00 am
From: $§Kalle§$ <__Kalle...@hPhone.eu>
Date: Sat, 7 Feb 2009 03:00:14 -0800 (PST)
Local: Sat, Feb 7 2009 6:00 am
Subject: Re: Reusing the +/- number spinner from TimePickerDialog?
"setCurrent" to set values works:
---
          try {
              Method m = c.getMethod("setCurrent", int.class);
              m.invoke(o, mDauer%60);
          } catch (Exception e) {
            Log.e("", e.getMessage());
          }
---

But how to get values? Any idea?

On 4 Feb., 18:43, solomonk <denis.solone...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Feb 7 2009, 11:06 pm
From: Dianne Hackborn <hack...@android.com>
Date: Sat, 7 Feb 2009 20:06:52 -0800
Local: Sat, Feb 7 2009 11:06 pm
Subject: Re: [android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

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 <denis.solone...@gmail.com>

--
Dianne Hackborn
Android framework engineer
hack...@android.com

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Beshoy  
View profile  
 More options Feb 10 2009, 9:29 pm
From: Beshoy <odsl...@gmail.com>
Date: Tue, 10 Feb 2009 18:29:59 -0800 (PST)
Local: Tues, Feb 10 2009 9:29 pm
Subject: Re: Reusing the +/- number spinner from TimePickerDialog?
Then how else can this be accomplished?????

On Feb 7, 10:06 pm, Dianne Hackborn <hack...@android.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Murphy  
View profile  
 More options Feb 10 2009, 9:32 pm
From: Mark Murphy <mmur...@commonsware.com>
Date: Tue, 10 Feb 2009 21:32:49 -0500
Local: Tues, Feb 10 2009 9:32 pm
Subject: Re: [android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

Beshoy wrote:
> Then how else can this be accomplished?????

As I wrote earlier in this thread:

"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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
clark  
View profile  
 More options Feb 10 2009, 9:59 pm
From: clark <clarkd...@gmail.com>
Date: Tue, 10 Feb 2009 18:59:28 -0800 (PST)
Local: Tues, Feb 10 2009 9:59 pm
Subject: Re: Reusing the +/- number spinner from TimePickerDialog?
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kumar Bibek  
View profile  
 More options Jan 6 2011, 1:40 pm
From: Kumar Bibek <coomar....@gmail.com>
Date: Fri, 7 Jan 2011 00:10:55 +0530
Local: Thurs, Jan 6 2011 1:40 pm
Subject: Re: [android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

Dig in the source code. What do you mean by public here?

http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/core/java/androi...

Use Google code search.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Lussmyer  
View profile  
 More options Jan 6 2011, 2:21 pm
From: John Lussmyer <johnlussm...@gmail.com>
Date: Thu, 6 Jan 2011 11:21:10 -0800
Local: Thurs, Jan 6 2011 2:21 pm
Subject: Re: [android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

I gave up and wrote my own that seems to work well.  XML Configurable,
doesn't create gobs of temp objects.
http://casadelgato.com/content/numberpicker


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MerlinBG  
View profile  
 More options Jan 7 2011, 2:00 am
From: MerlinBG <Merli...@gbg.bg>
Date: Thu, 6 Jan 2011 23:00:02 -0800 (PST)
Local: Fri, Jan 7 2011 2:00 am
Subject: Re: [android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Jan 7 2011, 3:49 am
From: Dianne Hackborn <hack...@android.com>
Date: Fri, 7 Jan 2011 00:49:24 -0800
Local: Fri, Jan 7 2011 3:49 am
Subject: Re: [android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

Yes you do, it is not in the SDK.

--
Dianne Hackborn
Android framework engineer
hack...@android.com

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
MerlinBG  
View profile  
 More options Jan 7 2011, 4:48 am
From: MerlinBG <Merli...@gbg.bg>
Date: Fri, 7 Jan 2011 01:48:18 -0800 (PST)
Local: Fri, Jan 7 2011 4:48 am
Subject: Re: [android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

Thank you.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »