How to show a cursor when user tap a view

by Long » Fri, 23 Oct 2009 23:12:40 GMT


Sponsored Links
 Hi,
  How can I show a cursor when user tap on a view.

Cheers.
Long
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. HD2 User di Bandung

As subject, siapa saja ya yang lokasi nya di Bandung dan pakai HD2?

Thanks

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

2. Fetch Spinner value outside setOnItemSelectedListener

Hi guys,

I have a spinner successfully working but I am trying to use the
spinner.setSelection method to "remember" the previous spinner value
when the activity is reloaded.

Outside of setOnItemSelectedListener, is there a function of the
spinner that can give me the selected index?

The following code is my function code to both setup the spinner and
then my attempt to set the spinner with the index previously selected:

private void setSpinner(int spinnerID){
                final Spinner spinner   =
(Spinner)findViewById(R.id.Spinner_gender);
                int spinner_value;


                spinner.setOnItemSelectedListener(
                                new AdapterView.OnItemSelectedListener() {
                                        public void 
onItemSelected(AdapterView<?> parent, View
itemSelected, int selectedItemPosition, long selected){
                                                spinner_value   =       
selectedItemPosition;
                                                Editor editor   =       
mGameSettings.edit();
                                                
editor.putLong(GAME_PREFERENCES_GENDER,
selectedItemPosition);
                                                editor.commit();
                                                
Toast.makeText(QuizSettingsActivity.this, "selected:
"+GAME_PREFERENCES_GENDER+"("+ spinner_value +")",
Toast.LENGTH_SHORT).show();
                                        }

                                                @Override
                                                public void 
onNothingSelected(AdapterView<?> arg0) {
                                                        // TODO Auto-generated 
method stub

                                                }

                                        }
                );

                ArrayAdapter<?> adapter =       
ArrayAdapter.createFromResource(this,
spinnerID, android.R.layout.simple_spinner_item);
 
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                spinner.setAdapter(adapter);
                if( mGameSettings.contains(GAME_PREFERENCES_GENDER) ){
                        spinner.setSelection(spinner_value);
                }

        }

All I am trying to do here is use spinner_value to remember the
selected index so I can set the spinner to that index.
However, the spinner_value is never holding the desired value at
spinner.setSelection(spinner_value); in the last lines of code

-- 

3. Mod: Ericsson Applications Awards

4. Three ListViews side by side

5. Droid Pro on sale a little early, shipping now

6. TUTORIAL FROYO JIT ON MILESTONE XT720

7. ADT painstakingly remove my exclusion setting for android library