expandablelistview

Android expandablelistview group/parent background image change when collapse or expand

I try to swap expandablelistview group background image when it is collapse or expand. But the background image was not correctly swap. For example when I expand the first group, background of second or third group get swapped. I am using RelativeLayout (group layout) and SimpleExpandableListAdapter (adapter). Here is what I did: // Cr...

ImageButton on Expandablelistview child item

Is it possible to have a clickable ImageButton on Expandablelistview child item? If yes, how to program its event listener? ...

Problem with ExpandableListView position

I have a "Dynamic" ExpandableListView. That is to say child are only load when there is click on there parent. So I use onGroupExpand to load list. It works but I must expand myself the group with expandableList.expandGroup(groupPosition); The problem is that, when I click on parent, the group expands but the view go back to the ...

ExpandableList in Android

Hi all! I've been working on this few days ago, but I need some guide here (I'm newbie to Android programming). In Api Demos there are 3 examples explaining how to fill a ExpandableList with data, one with arrays, other with List and the third with 2 cursors. So, suppose I want to have for example 3 categories: Video, Audio and Images...

android expandable list selector

How do you set the listSelector for an expandable list? I have set: listSelector="@android:drawable/list_selector_background" but this only seems to affect the group section rows, not the child rows underneath those. ...

LinearLayout in ExpandableListView

Hi guys, I want to inflate a childView of ExpandableChildView component. Code: public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { View v = convertView; LinearLayout linearOpt = themesOptions.get(childPosition); if(v == null) { ...

setSelectedChild not working for ExpandableListView

I have an ExpandableListActivity (for an RSS feed reader) which populates itself when the activity is created, that works fine. The groups are the item titles, and the children are a webview that contains the description. I also pass a parameter to it in the hope that I can automatically expand on of the groups to display the RSS descri...

Android View losing data on scroll

I have an application made up of an ExpandableList, whose children are data collection widgets like CheckBoxes and EditText. Once data is entered, it is immediately lost when the list is scrolled. What may be the problem or solution? Thanks. ...

Buttons in ExpandableListActivity

I have created an ExpandableListActivity where each group has a child consisting of a TextView on top of two Buttons as follows: <LinearLayout android:orientation="vertical"> <TextView/> <LinearLayout android:orientation="horizontal"> <Button/> <Button/> </LinearLayout> </LinearLayout> So basically a TextView on...

Disable collapsing of ExpandableListView

The default behavior of ExpandableListView is to collapse a group when its header is clicked. Is it possible to prevent this from happening? I've tried: Setting OnTouchListener on the list. This interferes with scrolling. Setting an OnGroupClickListener on the list (in onCreate()). This works for all clicks after the first. Has a...

ExpandableListView - Is conditional expansion possible?

I have an ExpandableListView bound to a SQLite database. To simplify things, lets assume the database contains two columns: title and body. In the ExpandableListView, there is a group for each title, and a childfor each corresponding body. Now to make things more interesting, some of the rows in the SQLite database do not have a body (t...

Android ExpandableListView within Tab OnGroupExpandedListener behaviour changes on switching tabs

I have an Activity with a few Tabs created dynamically within a loop, where each tab contains an ExpandableListView. I then register the OnGroupExpandedListener to each ExpandableListView within each tab, to have a behaviour that only one group can be expanded at any one given time. The problem arises when i switch to another tab, the pr...

Expandable ListView Sample from Google

Hello all, I just tried the current Google sample for ExpandableListiew: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html This sample seem very simple and easy to use. But what I would like to do is to say that one of the category has no child. I just removed all the child...

Android ExpanableListView and CursorTreeAdapters -- StaleDataException

Hi, I am trying to create an ExpandableListView from Cursors. The underlying database/table contains Group data and Child data as multiple rows. I am running a distinct + group by query to get the Group data and a separate query for the related Child Data (using a whereClause). The child view contains EditTexts and I have put FocusChan...

Sectioned ListView and ExpandableListView

Hi all, I need to create a layout with a title bar on the top and a list view with n sections. The list header of every section has got two distinct Buttons that must be clickable and focusable independently from each other. This is the code of the layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" andr...

IllegalStateException with ExpandableListActivity and SimpleCursorTreeAdapter

Using com.example.android.notepad and ExpandableList2.java from com.example.android.apis.view, I have written a simple application that contains a content provider serving two tables in an sqlite database and a display activity that uses my ExpandableListActivity subclass. I am using my own layouts for the ExpandableList, and the group a...

Android ExpandableListView Child Headers

I need to add a header to the top of the expanded children in an ExpandableListView. The same header should appear at the top of all expanded children. I've been trying to do it from the adapter like this: public int getChildrenCount(int groupPosition) { //Add one extra to children size return mGroups.get(groupPosition).size()+1; } ...

Setting focus programatically in ExpandableListView. Emulating D-pad clicks in code?

I have subclassed ExpandableListActivity to create an activity that presents a simple tree view of the 'world at large' and allows the user to select one for further use by the app. I am having trouble setting focus programatically. One thing that baffles me is that I can use the D-pad to set focus on any of the child or group items in m...

Android: ExpandableListViews and Checkboxes

Hey all. I have being playing around with expandable list views recently. I am trying to get a list view that has a checkbox as one of the elements of the child view. I found this tutorial, http://mylifewithandroid.blogspot.com/2010/02/expandable-lists-and-check-boxes.html, and it seemed perfect. However when I compiled it and sta...

Strange behaviour in Expandablelistview - Android

hi all, Im trying to implement an activity that uses ExpandableListView and I have gotten so far but now I have found some strange behavior. My activity is meant to record food intake as specified by the user. they have a choice of menus (breakfast, lunch and dinner - the outer group) which expand to show their contents. when a user c...