ListView row not receiving highlight with ImageButton in row

by fg1921 » Fri, 10 Apr 2009 04:21:53 GMT

Sponsored Links

This must be something very simple but I've tried almost everything
and still can't get this to work.

Basically I've made a custom LinearLayout view with a TextView and an
ImageButton to be used as a row for a ListView. The moment I use an
ImageButton tapping on the row does not highlight the row any more.
Moreover, I can't 'focus' the rows using the trackball, nor can I set
focus on the button.

If I remove the ImageButton and replace with an ImageView, the Row
highlight/selection works. How can I get row selection/highlight along
with ImageButton highlight at the same time?

Many thanks!

ListView row not receiving highlight with ImageButton in row

by fg1921 » Fri, 10 Apr 2009 07:34:51 GMT

 Ok I can see setting it to non-focusable 'solves' the problem but
that's not really what I was hoping to do. Well, too bad, the user
can't focus but only tap now.


Sponsored Links

Other Threads

1. Problem updating widget in emulator


I have a simple widget that sets up its appearance during the initial update. This involves using RemoteViews: updateViews.setImageViewResource(, R.drawable....); updateViews.setViewVisibility(, View.....); The widget's onUpdate method is the usual stuff: for (int i = 0; i < N; i++) { int appWidgetId = appWidgetIds[i]; RemoteViews updateViews = buildUpdate(context); appWidgetManager.updateAppWidget(appWidgetId, updateViews); } Somehow, on the emulator, both in 1.6 and 2.1, this code gets called, but the widget's views never get updated. The code works fine on the HTC Hero 1.5. I converted the layout to avoid using AbsoluteLayout and using FrameLayout instead. Evrything looks good to me, and still, no updates. Any thoughts on this? Thanks, -- Kostya Vasilyev --

2. finish an activity not started from current activity


I have following problem with my application:

can launch an action.
This action will result in an Intent being received by a
BroadcastReceiver, defined in my application.
Finally, this BroadcastReceiver will start an activity ("activity 2")
to deal with this intent.

The problem is that I have a "quit application" entry in my menu, and
I can only finish() currently active activity.
ie I am not able to finish "activity 1" from the menu of "activity 2".

And I can't use startActivityForResult() as "activity 2" can't be
started from "activity 1".

Any suggestion would be much appreciated
Thank you very much guys, regards.


3. Platform Versions Data Updated

4. LicMax

5. Change text size and color of listview

6. How to send the Email

7. EditText Image changing look when given at runtime.