expandablelistview

Multiple Android expandable lists in a layout

巧了我就是萌 提交于 2020-01-05 09:35:39
问题 I want to have more than one expandable list within a layout. It appears that an expandable list in a custom layout must have an id of "@id/android:list". So, how could I have more than one if they would need to have the same id? Thanks... 回答1: They don't have to have the @id/android:list ID - they only have to have that ID if you are using a ListActivity or ExpandableListActivity . Just use a normal Activity and give them unique IDs. 来源: https://stackoverflow.com/questions/1209726/multiple

Can't get String which is entered into Edit Text in ExpandableListView(Not the usual Focus issue)

让人想犯罪 __ 提交于 2020-01-05 09:22:32
问题 Hey so basically I have a Sign-in/Register screen for an app and I have to make it using an ExpandableListView as shown. Based on the position of the child in a group I have inflated different views. So for positions 0 and 1, I have inflated 2 different EditText boxes. My problem is I can't get the text that is typed in both the boxes. The box allows me to type continuously but when I click the Sign-In button, the strings I get from the username and password boxes using getText are both null!

Can't get String which is entered into Edit Text in ExpandableListView(Not the usual Focus issue)

感情迁移 提交于 2020-01-05 09:21:04
问题 Hey so basically I have a Sign-in/Register screen for an app and I have to make it using an ExpandableListView as shown. Based on the position of the child in a group I have inflated different views. So for positions 0 and 1, I have inflated 2 different EditText boxes. My problem is I can't get the text that is typed in both the boxes. The box allows me to type continuously but when I click the Sign-In button, the strings I get from the username and password boxes using getText are both null!

Access Child Item's individual ojects in Expandable Listview

不问归期 提交于 2020-01-05 07:30:54
问题 How do I access the child views of child items in any group view in expandable listview?? selectAll.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View arg0) { // TODO Auto-generated method stub int gourpsSum = adapter.getGroupCount(); for(int i = 0; i < gourpsSum; i++) { int childSum = adapter.getChildrenCount(i); for(int k = 0; k < childSum;k++) { boolean isLast = false; if (k == (childSum - 1)){ isLast = true; } CheckBox cBox = (CheckBox) adapter.getChildView

How to add different child lists for different parents lists in ExpandableListView for Android?

随声附和 提交于 2020-01-05 04:38:08
问题 I'm using an ExpandableListView to get an expandable list. I have 3 expandable "parent" lists: Price, Details, Notes. I want to be able to add unique child lists for each parent list. But the way its set up now, the same child list is being added for each parent list. How do I make it so I can add unique, separate child lists for Price, Details, and Notes? Here is my code: public class Assignment extends ExpandableListActivity { int listFlag = 0; @SuppressWarnings("unchecked") public void

When I add a view to a ListView Item, this Item reacts no longer properly

南楼画角 提交于 2020-01-05 02:44:48
问题 I want,a new View appears in my ListView Item , if I click this Item like this, where (1) and (2) are clicks and I can do it, but when I want to click again this Item , i.e. to hide that new View , then Item click reacts no longer in the way it should do. I perform the add View Operation in my onItemClickListener right to the properly position My code is the following ... list_view.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View

How do I add a footer View to a child List in a ExpandableListActivity?

早过忘川 提交于 2020-01-03 17:31:02
问题 I've been attempting to work out how to add a child View to a child List in an ExpandableListActivity , but to no avail. I can get the ExpandableListView and call addFooterView() on it, but that just adds the new View to the group list. (The data comes from a Cursor ). Any suggestions gratefully received. Cheers James 回答1: Unfortunately there is no ExpandableListView.addChildFooterView() method, or even ExpandableListView.addFooterView() for that matter. The method you are calling is the

How do I add a footer View to a child List in a ExpandableListActivity?

╄→尐↘猪︶ㄣ 提交于 2020-01-03 17:30:38
问题 I've been attempting to work out how to add a child View to a child List in an ExpandableListActivity , but to no avail. I can get the ExpandableListView and call addFooterView() on it, but that just adds the new View to the group list. (The data comes from a Cursor ). Any suggestions gratefully received. Cheers James 回答1: Unfortunately there is no ExpandableListView.addChildFooterView() method, or even ExpandableListView.addFooterView() for that matter. The method you are calling is the

How can I create a list with only certain items expandable?

馋奶兔 提交于 2020-01-03 10:59:11
问题 I am trying to compose a list with some items expandable and some single items. I wish to have it so that when either a single item or expandable list child is clicked, I can call an intent based on the text of the item. I suppose expandable lists would work, but is there a way to set items in an expandable list so that they don't have the expandable list icon? Should I use something other than a string array? What is the best way to do this? Thanks Below is my incomplete code, I would like

How can I create a list with only certain items expandable?

杀马特。学长 韩版系。学妹 提交于 2020-01-03 10:58:08
问题 I am trying to compose a list with some items expandable and some single items. I wish to have it so that when either a single item or expandable list child is clicked, I can call an intent based on the text of the item. I suppose expandable lists would work, but is there a way to set items in an expandable list so that they don't have the expandable list icon? Should I use something other than a string array? What is the best way to do this? Thanks Below is my incomplete code, I would like