Category : expandablelistadapter

I have ExpandableListView, under that there a is group which contains multiple Button Views as Child View. Below is the code for Button Views inside getChildView(), Button button[] = new Button[cost.size()]; button[childPosition] = new Button(context); button[childPosition].setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)); button[childPosition].setText(cost.get(childPosition)); linearLayout.addView(cost[childPosition]); linearLayout.setGravity(Gravity.CENTER_HORIZONTAL); What I need to achieve is, Consider there is 4 buttons. Now I tapped ..

Read more

I’m creating a task manager app. And I have a problem with showing these tasks in ExpandableListView, I’m using it because every task may have subtasks. This is my Database structure: Database Structure. ExpandableListView Adapter may work well. But I have a problem with reading data from firebase in fillData() method. Activity with ExpandableListView: public ..

Read more

My childview list is arraylist object stored from api response.when i give list.expandgroup(0),only first group is expanding.i want to expand clickable groups.pls help public class OrderHistoryAdapter extends BaseExpandableListAdapter { private List<OrderHistoryObj> orderHistoryObjList;// group list private List<OrderDetailObj> orderDetailObjList;//child list private Context mContext; OnOrderListner onOrderListner; private LayoutInflater inflater; public OrderHistoryAdapter(Context mContext,List<OrderHistoryObj> orderHistoryObjList,List<OrderDetailObj> orderDetailObjList,OnOrderListner onOrderListner) { // Create ..

Read more