How to get a "vertical spinner" like used in TimePicker?

by Eugene M » Wed, 04 Mar 2009 23:51:12 GMT


Sponsored Links
 Hi everyone,

The TimePicker widget includes two "vertical spinners" that let the
user pick the hour and minute. How can I make my own "vertical
spinner" to let the user pick an arbitrary number from a range of
values? The available Spinner class is more like a drop-down list,
while I want something that has a number in the middle and + and -
buttons on either side to increase or decrease the value. Does this
kind of widget exist? Or do I have to roll my own with a text field
and two buttons?

Thanks!

--~--~---------~--~----~------------~-------~--~----~



How to get a "vertical spinner" like used in TimePicker?

by $搂Kalle搂$ » Thu, 05 Mar 2009 03:24:24 GMT


 Hola Eugene,

have a look at the discussion under the topic"Reusing the +/- number
spinner from TimePickerDialog?"

Ciao Wolfgang



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to get a "vertical spinner" like used in TimePicker?

by Eugene M » Thu, 05 Mar 2009 05:03:56 GMT


 Thanks! In case its of interest to others, that thread is here:



Other Threads

1. getSharedPreferences and static reference to a Context object

Hello.

In my Android application, I have to call the getSharedPreferences in
non-activity classes.

In order to avoid passing a Context object to each constructor of
these classes (and because many of them are classes with only static
methods which don't have a constructor), I have implemented these
steps :

The main activity of my application (which is launched at startup) is
called Dispatcher.

In the onCreate method of this class, I keep a reference to the
created Dispatcher object in a static public variable of the
Dispatcher class which can be accessed from any class in the project.

Here is the squeleton of this class:

public class Dispatcher extends Activity {

    public static Dispatcher ref;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        ref = this;
        ...
    }

    ...
}

This class calls this method to start other activities :
startActivityForResult(new Intent(Dispatcher.this,
RegisterScreen.class), S.REG);

The problem is that when I try to use the
Dispatcher.ref.getSharedPreferences(...) method in one of my classes,
on some devices it works well and on other devices, I get a
NullPointerException.

Can you please help me to solve this problem.

Thank you.

Best regards.

Patrick.

-- 

2. Dialog change orientation

Hi,

Does anyone know if it is possible to change the orientation of a
dialog ONLY. So i show a dialog in landscape while the activity
remains in portrait. Anyone know how to do this?

-- 

3. emulator/ host network setup problems

4. horizontalScrollView + TabHost

5. google API with android

6. App comment spam

7. LVL found to be easy to crack