tag:blogger.com,1999:blog-8214401912480503366.post4398748054285682865..comments2023-08-10T13:35:15.093+02:00Comments on My life with Android :-): Expandable list and checkboxes revisitedGabor Pallerhttp://www.blogger.com/profile/14307475522972458932noreply@blogger.comBlogger69125tag:blogger.com,1999:blog-8214401912480503366.post-49924147196627672652016-08-16T17:00:54.184+02:002016-08-16T17:00:54.184+02:00ANYONE KNOWS HOW TO LIMIT THE TEXT BOX SELECTION I...ANYONE KNOWS HOW TO LIMIT THE TEXT BOX SELECTION IN EXPANDABLE LIST VIEW ? <br />FOR EG:- <br /><br />ONE 2 BOXES OUT OF FIVE SHOULD BE SELECTED FROM THE PARENT CELLS AND IF WE CLICK ON THE THIRD IT SHOULD DISPLAY TOAST OR SOMETHING SAYING LIMIT REACHED ONLY 2 CAN BE SELECTED ..<br />PLZZ HELP ....Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-32472091953484684562016-05-08T16:53:49.198+02:002016-05-08T16:53:49.198+02:00Can you comment or advice to decide my problem. Si...Can you comment or advice to decide my problem. Similar to your post funcionality. My problem in this link: http://stackoverflow.com/questions/37100732/expandablelistview-with-checkboxes-display-in-dialog . Anonymoushttps://www.blogger.com/profile/09157941009825461786noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-90155183744110316052015-10-21T16:40:56.746+02:002015-10-21T16:40:56.746+02:00This is not working well if you select few checkbo...This is not working well if you select few checkboxes and scroll the list. If you scroll back again the list shows the older state. It does not persist new selections. Any suggestion on that?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-35889627787394999062014-10-01T08:17:16.553+02:002014-10-01T08:17:16.553+02:00Gober Paller Please help me it's very urgent i...Gober Paller Please help me it's very urgent i want to click on checkbox of child class.Anonymoushttps://www.blogger.com/profile/04662407378063767749noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-80793666413152540162014-10-01T08:16:37.216+02:002014-10-01T08:16:37.216+02:00Gober Paller Please help me it's very urgent i...Gober Paller Please help me it's very urgent i want to click on checkbox of child class.Anonymoushttps://www.blogger.com/profile/04662407378063767749noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-20723913905386274032014-10-01T08:15:56.417+02:002014-10-01T08:15:56.417+02:00Gober Paller Please help me it's very urgent i...Gober Paller Please help me it's very urgent i want to click on checkbox of child class.Anonymoushttps://www.blogger.com/profile/04662407378063767749noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-91881687761291252232014-10-01T07:51:33.193+02:002014-10-01T07:51:33.193+02:00Gober Paller thanx for responding my comment... my...Gober Paller thanx for responding my comment... my check box is in child class.Anonymoushttps://www.blogger.com/profile/04662407378063767749noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-71389889782431550532014-09-29T21:29:22.364+02:002014-09-29T21:29:22.364+02:00Jayashree Behera, so where are those check boxes? ...Jayashree Behera, so where are those check boxes? In group level position or outside the expandable list?Gabor Pallerhttps://www.blogger.com/profile/02390936870056951146noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-88535007127655490452014-09-29T14:39:01.970+02:002014-09-29T14:39:01.970+02:00 Gabor Paller ... thanx for considering my comment... Gabor Paller ... thanx for considering my comments. Actally i want to click on checkboxes not in child position.Anonymoushttps://www.blogger.com/profile/04662407378063767749noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-38542116182577240662014-09-27T20:51:34.077+02:002014-09-27T20:51:34.077+02:00Jayashree Behera, please check the comments, parti...Jayashree Behera, please check the comments, particularly the ones from Seyfeddine Aloui.Gabor Pallerhttps://www.blogger.com/profile/02390936870056951146noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-402424985513338402014-09-27T12:16:45.718+02:002014-09-27T12:16:45.718+02:00When i am clicking on child class it is setting th...When i am clicking on child class it is setting the checkboxes. can you help me to work on checkboxes. I want if i will click on checkbox it will show the group position as well as child position.Anonymoushttps://www.blogger.com/profile/04662407378063767749noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-58764303600435803922014-05-12T12:55:08.151+02:002014-05-12T12:55:08.151+02:00Bhai Na avadtu hoy to blog na lakhaso pan ramado ...Bhai Na avadtu hoy to blog na lakhaso pan ramado nahi please yaar time waste thay chhe !!!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-74826379701208797362013-06-05T07:46:54.168+02:002013-06-05T07:46:54.168+02:00Hi,
I customized your code and add to checkbox fe...Hi,<br /><br />I customized your code and add to checkbox feature, but there is a problem and i'm going to be crazy to solve it.<br /><br />I want to check all checkbox from the parent root group but it does check one.<br /><br />Could you help me on this issue?<br /><br />Thank you so much.<br /><br />The Customize Android project link : https://mega.co.nz/#!tw8gjJ5Y!XDYFvTYBObRJUVa2dLAGxTMtXBcwYpOvY4nfejt7U40mutkanhttps://www.blogger.com/profile/05211643673860702290noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-14851957608879256902013-05-20T12:34:50.204+02:002013-05-20T12:34:50.204+02:00Hey Man!
i found a solution you must make differ...Hey Man! <br /><br />i found a solution you must make difference between clicking on checkbox and clicking on the childrow ! so let's make it editable just from the onChildClick() method just by editing the child_row.xml file : <br /><br /><br />thank you man ;) Seyfeddine Alouihttps://www.blogger.com/profile/06345707777914785182noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-7261626463031696722013-05-20T12:22:58.199+02:002013-05-20T12:22:58.199+02:00Hi Gabor,
thank you for your answer, but i'm ...Hi Gabor,<br /><br />thank you for your answer, but i'm not talking about the states after the activity die but about saving the states after unexpanding the parentrow ... i added a method called setState in Color.java class and i added this code in onChildClick() method:<br /><br /> public boolean onChildClick(<br /> ExpandableListView parent, <br /> View v, <br /> int groupPosition,<br /> int childPosition,<br /> long id) {<br /> Log.d( LOG_TAG, "onChildClick: "+childPosition );<br /> CheckBox cb = (CheckBox)v.findViewById( R.id.check1 );<br /> Color c = (Color)getChild( groupPosition, childPosition );<br /> if( cb != null ){<br /> if (c.state==true){<br /> cb.setChecked(false); <br /> c.setState(false);<br /> }<br /> else<br /> {<br /> cb.setChecked(true);<br /> c.setState(true);<br /> }<br /> <br /> }<br />but nothing is changing ! help :/Seyfeddine Alouihttps://www.blogger.com/profile/06345707777914785182noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-45319378563046100572013-05-17T22:20:20.662+02:002013-05-17T22:20:20.662+02:00Hi, Seyfeddine,
The example program takes the des...Hi, Seyfeddine,<br /><br />The example program takes the description of the list elements from a two-level list structure.<br /><br />ArrayList> colors = new ArrayList>(); <br /><br />Second-level lists store Color instances that have a field variable called "state". That field is used to initialize the checkbox states.<br /><br />Now this example program does not feed back checkbox state changes into this structure. So what you should do in onChildClick is to update the "state" field of the appropriate instance. When the Activity dies, save the state list in onSaveInstanceState. Restore this state into that list in onCreate if that method is called with a non-null Bundle parameter (that Bundle will give you back the state you saved in onSaveInstanceState).Gabor Pallerhttps://www.blogger.com/profile/02390936870056951146noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-37891357220900362892013-05-17T18:42:39.272+02:002013-05-17T18:42:39.272+02:00thank you for this great post :)
i have a problem...thank you for this great post :)<br /><br />i have a problem here : i understand now how you can save the original states of the checkboxes but how can i maintain checkbox selection ! what should i do in onChildClick() method? i think that i must rebind the adapter ...but i can't find a way to do it!<br /><br />please give me what should i doSeyfeddine Alouihttps://www.blogger.com/profile/06345707777914785182noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-79534768904518212802013-01-09T20:09:10.366+01:002013-01-09T20:09:10.366+01:00This post is very instructive, thanks!!!This post is very instructive, thanks!!!Anonymoushttps://www.blogger.com/profile/13723141123347718141noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-48791285572433510872012-08-18T15:29:31.133+02:002012-08-18T15:29:31.133+02:00hello,
you have given very good example but can yo...hello,<br />you have given very good example but can you tell me how can i maintain checkbox selection ! because when i uncheck/check and then select another parent item, my selection reset at starting bind items. :( <br />i change your 'cb.toggle();' to below but not working !!<br /><br /> if( cb != null ){<br /> if(cb.isChecked()){<br /> cb.setChecked(false);<br /> }else<br /> {<br /> cb.setChecked(true);<br /> } <br /> <br /> }<br /><b><br />Please solve it.! </b>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-84362416624135474672012-08-15T20:00:38.515+02:002012-08-15T20:00:38.515+02:00Hi Gabor,
Thanks a lot...Hi Gabor,<br />Thanks a lot...Divyanoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-91724425267832402392012-07-13T10:58:47.961+02:002012-07-13T10:58:47.961+02:00Thanks for this solution ,i have implemented based...Thanks for this solution ,i have implemented based on your solution i got everything.now i have to implement mutipleselction thing .and how can i searchbox can be implement in expandible can you please elaborate how to do this.bujjihttps://www.blogger.com/profile/01939387965461827812noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-33344139498817599062012-05-30T20:15:38.528+02:002012-05-30T20:15:38.528+02:00Thanks for posting this code! I am using it succes...Thanks for posting this code! I am using it successfully. I am new to Android programming and was wondering how to have the checkboxes be checked, based on database content. Currently, I update the arrays when the chekboxes are checked or unchecked and then re-bind the adapter. I need a way to have the values be check if there is data in the database. Any ideas how to check the checkboxes once they have been rendered? Thanks again. Almost there!5 little speckled frogshttps://www.blogger.com/profile/16586028432800979321noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-37285482524328789722012-05-22T00:00:11.249+02:002012-05-22T00:00:11.249+02:00Gabor, thanks. I needed to find a way to control w...Gabor, thanks. I needed to find a way to control when the group was clicked on. Looked up the ExpandableListView on the android site and figured it out.Aaronhttps://www.blogger.com/profile/17750336583833628262noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-39059693580447622622012-05-21T23:41:24.520+02:002012-05-21T23:41:24.520+02:00Aaron, that code is inside the ExpandableListView ...Aaron, that code is inside the ExpandableListView class.Gabor Pallerhttps://www.blogger.com/profile/02390936870056951146noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-1409047246411724302012-05-21T20:04:25.243+02:002012-05-21T20:04:25.243+02:00I have been looking through the code. I cannot tel...I have been looking through the code. I cannot tell what piece of code executes when you click on the button by grey, blue, etc. What piece of code expands the menu?Aaronhttps://www.blogger.com/profile/17750336583833628262noreply@blogger.com