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 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

Here is what I'm working with: I have an ExpandableListView that uses a SimpleCursorTreeAdapter
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 on a project where I need to add points to an array. Here
Working on my first Android app here. I've searched and tried everything I can
Working on rewriting the front-end of my site in Coffeescript. I understand how to
I'm working on a project that has an ExpandableListView nested inside a regular ListView
I have a ExpandableListView in which i am loading custom layouts in both group
Working with Json, how can I NSlog only the title in this code: NSDictionary
I'm working on an app that involves and ExpandableListView. We should like to replace

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.