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

  • Home
  • SEARCH
  • 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 6209393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:58:37+00:00 2026-05-24T05:58:37+00:00

I am working with an ExpandableListView in my application. It worked fine until I

  • 0

I am working with an ExpandableListView in my application. It worked fine until I decided to add an ImageButton to the end of it. Here is my XML:

This is my group row:

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" 
android:layout_width="match_parent"
android:layout_height="wrap_content" 
android:weightSum="1">
<TextView 
    android:text="location"
    android:layout_height="45dp"
    android:layout_width="250dp" style="@style/listResultsTitle"
    android:id="@+id/results_location_row" 
    android:gravity="center_vertical"
    android:layout_alignParentTop="true" 
    android:layout_alignParentLeft="true"
    android:layout_marginLeft="40dp">
</TextView>
<TextView 
    android:text="ad" 
    android:textAppearance="?android:attr/textAppearanceSmall" 
    android:layout_height="30dp" 
    android:layout_width="wrap_content" 
    style="@style/listResults" 
    android:id="@+id/results_ad_row" 
    android:layout_alignBottom="@+id/results_location_row" 
    android:layout_alignLeft="@+id/results_location_row" 
    android:layout_alignRight="@+id/results_location_row">
</TextView>
<ImageButton 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/prox_order" 
    android:src="@drawable/ic_menu_add" 
    android:background="@android:color/transparent" 
    android:layout_centerVertical="true" 
    android:layout_alignParentRight="true">
</ImageButton>

Now, the ExpandableListView will not expand. Does anyone know what the problem could be?

EDIT: Okay, I understand what the problem is. I have a view that is focusable that causes the onItemClickListener not to be called when I click on a row. I implemented an onClickListener that captures the click, but I do not know how to expand the row. Can anyone help out? Here is the code that I have inside of my custom Adapter:

 v.setOnClickListener(new OnItemClickListener(groupPosition, this))
 private class OnItemClickListener implements OnClickListener{
    private int pos;
    MySimpleExpandableListAdapter adapter;
    OnItemClickListener(int groupPosition, MySimpleExpandableListAdapter _adapter){
        pos = groupPosition;
        adapter = _adapter;
    }
    @Override
    public void onClick(View v) {
        Log.e("Adapter", "Row clicked: #" + String.valueOf(pos));
    }
}

~Nemisis7654

  • 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-24T05:58:37+00:00Added an answer on May 24, 2026 at 5:58 am

    Romain Guy himself has answered your question rather succinctly in this group discussion.

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

Sidebar

Related Questions

Hello i have a simple expandable list activity that was working fine until i
I need a working example of an application that uses an expandableListView. I have
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
Working on this page: http://www.karlsenner.dreamhosters.com/about.php and having trouble with the navigation in IE6. It
Working on some matrix code, I'm concerned of performance issues. here's how it works
Working on some legacy hibernate code. How do I do the following with hbm.xml(hibernate
Working on an iPhone application through a TightVNC connection into a Mac Mini; the
I have a ExpandableListView in which i am loading custom layouts in both group
Working with spring, below, the code of applicationContext-service.xml: <bean id=mediaObjectService class=path.MediaObjectServiceImpl> <property name=mediaObjectDao >
Working on a legacy ASP.NET application we've found that ASP.NET session gets used for

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.