expandablelistview

Expandable list view

↘锁芯ラ 提交于 2020-01-03 05:31:39
问题 i am newbie in android development.. i m using expandable listview , In each row of listview i have 3 textview and 1 button ,on button click i want selected child data to be on another activity with his Group header name is that possible in Expandable list view if its then how ? please help... 回答1: For expandable list just implement following code: ExpandableListDemo.java public class ExpandableListDemo extends Activity { private ExpandableListView expandableListView; private ArrayList<Places

Multi level view: expandablelistview

情到浓时终转凉″ 提交于 2020-01-01 07:04:54
问题 I am trying to write multi level tree. I did look at expandablelistview, but it only supports two levels. I did look at other questions(SO) & posts and the most promising post i have found is http://mylifewithandroid.blogspot.com/2011/02/3-level-expandable-lists.html I understand that i will have to write something custom to handle multiple level tree. What is the best recommended approach to take? Can i add an exapandablelistview as a child to an exapanablelistview?? Thanks 回答1: You can

Android disable auto scroll in expandable list view

∥☆過路亽.° 提交于 2020-01-01 06:34:28
问题 i use in expandable listview and when i open one of the items in the listview my scroll is automatically focus on the item that open, can i prevent from the list to focus on the new item and stay in the same place? i've try to remove the focusable from the open's view but it didn't work. 回答1: You need to override the OnGroupClickListener and consume the event. This will avoid the ExpandableListView doing the default action, which at least when compiling against 4.3 is to smoothScroll to the

getChildView not being called

99封情书 提交于 2019-12-30 04:33:10
问题 I am making a menu which includes a custom ExpandableListView adapter. Despite trying to match my code as close to the API examples and any other examples I've seen online (including multiple closely related SO questions), I still can't get it working. I know the adapter is being used because the group view is being shown (which is made from an xml). Clicking on the group item also calls "getGroupView", but the code never runs "getChildView", "getChild", or "getChildId". I've even went

How to add image in expandablelistivew?

て烟熏妆下的殇ゞ 提交于 2019-12-29 09:27:52
问题 I am using expandablelistview in my project,and I want to add different images for group view and also in child view I want to do same,but its not working,following is my code.. MainActivity.java public class MainActivity extends Activity { ExpandableTests listAdapter; ExpandableListView expListView; List<String> listDataHeader; HashMap<String, List<String>> listDataChild; private List<Integer> group; private HashMap<Integer, List<Integer>> Child; Expandableimageadapter imgsadadapter; public

How to add image in expandablelistivew?

£可爱£侵袭症+ 提交于 2019-12-29 09:26:18
问题 I am using expandablelistview in my project,and I want to add different images for group view and also in child view I want to do same,but its not working,following is my code.. MainActivity.java public class MainActivity extends Activity { ExpandableTests listAdapter; ExpandableListView expListView; List<String> listDataHeader; HashMap<String, List<String>> listDataChild; private List<Integer> group; private HashMap<Integer, List<Integer>> Child; Expandableimageadapter imgsadadapter; public

Cannot Type EditText in ExpandableListView Child

大憨熊 提交于 2019-12-29 05:36:33
问题 i am using expandableList and each child has its edittext to enter a number... when the child is pressed, the edittext shows. if it is not, the edittext stays invisible.. but when i tap on the edittext, the keyboard shows in number (because i set type input : number) only 1 second. after that it turns to common keyboard. even it backs to common keyboard, still, i cant type on the edittext... here is my code public View getChildView(int groupPosition, int childPosition, boolean isLastChild,

Android: ClassCastException when adding a header view to ExpandableListView

↘锁芯ラ 提交于 2019-12-28 05:16:12
问题 I'm trying to add a header to an ExpandableListView like so: headerView = View.inflate(this, R.layout.header, null); expandableListView.addHeaderView(headerView); expandableListView.setAdapter(new SectionedAdapter(this)); Which gives me the following error: 12-08 16:23:42.354: ERROR/AndroidRuntime(421): Caused by:java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams 12-08 16:23:42.354: ERROR/AndroidRuntime(421): at android.widget.ListView.clearRecycledState(ListView.java:504)

Android - NestedScrollView which contains ExpandableListView doesn't scroll when expanded

℡╲_俬逩灬. 提交于 2019-12-28 02:55:07
问题 I have an ExpandableListView inside a NestedScrollView (yes I know, it is not good to have a scrolling view inside another scrolling view but I don't know what else to do, please do tell me if anybody knows a better approach). The size of the content in NestedScrollView is still within the screen so it won't scroll, but when ExpandableListView is expanded, the content will leak outside the screen but the NestedScrollView still won't scroll.. Why is this so? Here's my NestedScrollView layout :

onClick Childlist on ExpandableList Android

血红的双手。 提交于 2019-12-25 16:39:30
问题 i am using expandableList and each child has its edittext to enter a number... when the child is pressed, the edittext shows. if it is not, the edittext stays invisible..the problem is when i pressed child "A", some other childs (for example child "L" and "Z") also show the edittext... here is my code in main activity : protected void onCreate(Bundle konsumsi) { super.onCreate(konsumsi); setContentView(R.layout.konsumsi_user); exKonsumsi = (ExpandableListView) findViewById(R.id.EVkonsumsi