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. Problem installing .apk


I have developed a few application for android
but have problem with one of them.
After installing my app on emulator, I can not
see it on applications' list -- I do not have problem
with my other application, only with this one.
What I do wrong?

I ran emulator:


After that, I executed "adb logcat" and
installed application: adb install C:\MyApp.apk

It is possible to see file in shell:
# ls /data/app
-rw-rw-rw- root rot 70480 2008-01-20 21:40 MyApp.apk

Logcat has reported:

D/PackageManager(  467): Removing package
D/PackageManager(  467):   Services:
D/PackageManager(  467):   Activities:

D/ActivityManager(  467): Force removing app null
D/PackageParser(  467): Scanning package: /data/app/MyApp.apk
D/PackageManager(  467): Adding package
D/PackageManager(  467):   Services:
D/PackageManager(  467):   Activities:

Thanks in advance for help.


2. cannot get attribute from XMLReader (SAX)

This works fine in j2se, but am stumped why it fails in android.
Cannot get attribute "base" from XMLReader (SAX). It is always null.
Any help appreciated.

<xs:complexType name="RelativeURI">
                <xs:extension base="xs:anyURI">
                        <xs:attribute ref="xml:base"/>
                        <xs:attribute name="href" type="xs:string"/>

<xs:element name="imgLocation" type="RelativeURI" minOccurs="0"

<imgLocation xml:base="file:/data/data/
files/" href="hasaudio.jpg"/>

allocating parser:
parser = XMLReaderFactory.createXMLReader();


       SAXParserFactory spf = SAXParserFactory.newInstance();
       SAXParser sp;
        sp = spf.newSAXParser();
       // Get the XMLReader of the SAXParser we created.
        parser = sp.getXMLReader();

trying to retrieve the attribute, *base is always null*

String base = atts.getValue("
namespace",                                             "xml:base");


String base = atts.getValue("", "base");


3. OHA members are inside Android - literally ...njoy

4. Date and time pickers in an XML layout file - how to get to work?


6. Single .apk from Multiple projects

7. SSL client side authentication