Can't get out of TouchMode

by gymshoe » Tue, 06 Jan 2009 12:48:03 GMT

Sponsored Links
 This is my problem:
I have an activity which displays a gallery which is initially
visible.  When the user clicks on the gallery, the gallery visibility
is changed to "gone" and a datapage is displayed (i.e. becomes
"visible"). When the datapage is clicked, the process reverses and the
gallery becomes "visible" and the datapage is "gone".

Everything works except:
When I use TouchMode to toggle from datapage to the gallery, when it
comes back to the gallery, it appears to be stuck in TouchMode -
nothing is selected and the Dpad won't work. (Like I said, the
application behaves like it is stuck in TouchMode, but since the
isInTouchMode() method was removed from the SDK, i can't seem to
verify this.) When I toggle from gallery to datapage, I have no
trouble exiting TouchMode by using the Dpad, or keyboard.

The xml layout for toggling between gallery and the datapage is based
on the FrameLayout.
I have tried changing the "focusable" and "clickable" attributes for
the gallery, and FrameLayout, but this doesn't fix anything.

I can provide more specifics if it would help.

Any ideas or guidance would be appreciated.

Other Threads

1. remove checkboxpreference in preferencescreen

Your requirement is not quite clear. You need to put some light on it.

What I understood is, you have an XML, where you have defined some
preferences. Then, you show them in a PreferenceActivity (using
Now, there is one checkbox type preference, which you dont want your
user to be able to change.

I am assuming that you are willing to change that preference from code
(otherwise, how is it going to be changed?)

So, just remove that checkbox preference from your XML. Then, your
user will not able to see it.

Then, add/read/modify that preference from code.
In preferences, there is an edit() method, which return an Editor. You
can incove putBoolean(String key, boolean value) on the Editor to add
a key-value.
Dont forget to call commit().

Sarwar Erfan


2. Fwd: Image flicker

May be this can help you...

Sarwar Erfan


3. Android Library Project

4. Codec for BlueZ

5. Farewell, we hardly knew ye

6. Largest Android application?

7. screen protektor n sarung HP