FAQ Database Discussion Community


ExpandableListView groupView checkbox unticking other groupviews

android,checkbox,expandablelistview,expandablelistadapter
I have the following adapter in my Activity. I have set a CheckBox on the GroupView that when touched will check/uncheck the child views (which also have a CheckBox). The state of the CheckBox(true or false) is stored in the DB and initially set to true/checked. The checkboxes are set...

How to get views from onGroupExpanded

android,expandablelistview,expandablelistadapter
I have an expandable listview in my app and I want to do something to a specific group icon once this group is clicked. I've tried overriding onGroupExpanded() but I dont know how to extract the views from it. All I get passed into this method is the group position...

Android ExpandableListView : set background color of selected item on click

android,android-listview,expandablelistview,expandablelistadapter
I am trying to set a background color for item when the user click on a child item in my expandableListView. Here is the code : expListView.setOnChildClickListener(new OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, final int groupPosition, final int childPosition, long id) { AlertDialog.Builder builder = new AlertDialog.Builder(New_annonce_act_step2.this);...

Android ExpandableListview all child item in every group

android,expandablelistview,expandablelistadapter
I create ExpandableListview in Android. I use custom adapter but my all child item is in every single group. Result that I want to : [ First ] [ Second ] [ Third ] - AAA - DDD - GGG - BBB - EEE - HHH - CCC - FFF...

can I add an image header in navigation drawer layout

android,android-studio,header,navigation-drawer,expandablelistadapter
how can i add an image header to my navigation drawer layout like this one and this is my code : MainActivity.java package com.webileapps.navdrawer; import android.app.AlarmManager; import android.app.AlertDialog; import android.app.PendingIntent; import android.content.Context; import android.content.DialogInterface; import android.content.res.Configuration; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.app.Fragment; import...

onChildClickListener not working in Expandable List View

android,expandablelistview,expandablelistadapter
I am creating an application, which has an expandable list view I am able to get the expandable list view, but my child click is not working. I am trying to display a toast message on clicking a child in expandable list view. Please help me and let me know...

How to use expandable list view in the following scenario

android,list,expandablelistview,expandablelistadapter
I am creating an application, which has different screens for admin users and different screens for normal users. When admin logs in, screen will be displayed which consists of expandable list views. The Expandable list view header is a string array. The child items are the list of values obtained...

Android get convertView from BaseExpandableListAdapter

android,view,expandablelistview,expandablelistadapter
I need to call the BaseExpandableListAdapter method @Override public View getChildView(int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) or something like that to get the view that the method returns. The problem is, if I call that method, I have to pass null to convertView, which will...

Updating child item in ExpandableListView

android,expandablelistview,expandablelistadapter
I have a shopping cart in the style of an ExpandableListView. I am trying to update the right drawable graphic of a child item. All the child items start out showing a "+" and I want this to change to a "-" when clicked. I tried doing this in the...

Null pointer exception while setting image in child view of Expandable list view [closed]

android,adapter,expandablelistview,expandablelistadapter
I am getting a Null Pointer Exception in the line child.bg[i] = bground[0];. I'm trying to set image in ImageView of child item. I have a ImageView and TextView in Child item layout. Here is the code of populating data in Expandable List View. List<GroupItem> items = new ArrayList<GroupItem>(); int[]...

recycling view create issues in checkbox state of childview in ExpandablelListview android

android,expandablelistview,expandablelistadapter
In my ExpandableListview, I am using Imageview and Checkbox for childview that resembles the shape image and name. When I tick the checkbox of particular child item , the other child item also gets ticked, after scrolling the checked state changes. I needed multiple values to be selected. public class...

ExpandableListView onChildClick doesn't fire (in master/detail flow)

android,android-fragments,expandablelistview,expandablelistadapter
I know a lot have asked similar questions, but none of their solutions works for me. I have a master/detail flow with a expandable list as the list. I can click the groups and expand them, but I can't click the children. I have set them to selectable (at first...

Expandable ListView Child return wrong view after scroll down

android,android-listview,expandablelistview,expandablelistadapter
I use Expandable Listview for displaying two group of content and the list is always expand like Picture A. I found a problem, when I run it on my device. When I run, it show just a half of the list like in Picture B, so I scroll down to...

Android: Expandable Listview - Load Child content from remote database

android,database,expandablelistview,expandablelistadapter
I have an ExpandableListView with Group headers which wont change. Now I want to bind children of the group with different data from remote database such as MySQL or MSSQL. I have already done this for normal ListView using JSON, I have no idea how to implement it for ExapandableListView....