Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1034775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:26:43+00:00 2026-05-16T14:26:43+00:00

When I use a ImageButton in the ListView row, the ros is no selectable.

  • 0

When I use a ImageButton in the ListView row, the ros is no selectable. When I change it to a ImageView it is selectable.

I have this simple row layout, and below is my list , am I missing something simple?

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_height="fill_parent" 
android:layout_width="fill_parent" 
android:orientation="horizontal"
android:id="@+id/layoutrowtop">

    <ImageButton android:id="@+id/imgDetailDisclosure" 
    android:layout_height="fill_parent" 
    android:layout_width="48dip" 
    android:layout_gravity="center_vertical"
    android:background="#00000000">
    </ImageButton>

    <RelativeLayout 
        android:layout_width="wrap_content"
        android:layout_height="?android:attr/listPreferredItemHeight"
        android:padding="6dip">

                <TextView android:id="@+id/firstLine" 
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:ellipsize="marquee"
                android:textStyle="bold"
                android:textSize="18dp"
                android:singleLine="true"
                android:gravity="top"
                ></TextView>

                <TextView android:id="@+id/secondLine" 
                android:layout_height="fill_parent" 
                android:layout_below="@+id/firstLine" 
                android:layout_width="wrap_content"
                android:ellipsize="marquee"
                android:textStyle="italic"
                android:textSize="14dp"
                android:singleLine="false"
                android:gravity="top"
                android:lines="2"></TextView>
    </RelativeLayout>
</LinearLayout>

<LinearLayout  
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_width="fill_parent">
<EditText  
    android:id="@+id/search_box"
    android:layout_height="wrap_content" 
    android:layout_weight="1"
    android:layout_width="fill_parent"
    android:hint="type to filter"
    android:inputType="text"/>

<ImageButton 
    android:id="@+id/search_button"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"
    android:src="@drawable/icon_mag_glass"/>

</LinearLayout>

<!-- Set height to 0, and let the weight param expand it -->
<!-- Note the use of the default ID! This lets us use a ListActivity still! -->
<ListView android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="0dip"
    android:layout_weight="1" />

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:26:43+00:00Added an answer on May 16, 2026 at 2:26 pm

    You added an object that is focusable (the ImageButton) to your ListView, which makes the ListView items not focusable. See related question for some more details and options: TextView and Button in each row and onListItemClick()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ImageButton, which should contain the text. For this I use LayerDrawable
I'm having trouble figuring out how could I use my imagebutton (see below) in
in my app i use list view. in the list view i have three
i'm making a listview ,but scrolling is too slow. i have a ImageButton and
My boss said I have to use Android Query, and i found this site:
I don't want to use ImageButton inside my list. I want to call the
I have a confusion about ImageButton . I can make an ImageView clickable and
use Modern::Perl; use Algorithm::Permute; use List::AllUtils qw/uniq/; find_perms(1151); sub find_perms { my ($value) =
I'm trying to use the ImageButton control for client-side script execution only. I can
How can I have an imagebutton stay in the 'pressed' state when it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.