How to create a custom ListView in Sketchware?
The recently added Custom View in Sketchware can be used to create custom ListView. The steps you need to follow in order to create a custom ListView are given below.
1. In VIEW area of your sketchware project, add a ListView.
1. In VIEW area of your sketchware project, add a ListView.
2. Add a new CustomView.
3. Now in properties of ListView, select the new view you added as customView.
4. Now in the VIEW area of CustomView, add a Linear (H) and a TextView.
5. In LOGIC area of your app, add a new list Map.
6. In onCreate event in your project, add items to the Map list using a single key. After adding items to list, setListCustomViewData of ListView to List Map (See image below).
7. In LOGIC area of your app add a new event ListView: onBindCustomView.
8. In event ListView: onBindCustomView, set the text of TextView in CustomView to the data from list Map.
9. If you want to implement some action on clicking any particular item in CustomView, use the When view... clicked block available at the place where new variables are added.
10. Save and run the project to see the Custom ListView.
The video below shows how multiple lists can be used in a single Custom ListView.
how to fix java.lang.NullPointerException. i am fetching data from firebase.. at very first use app is working but when i close app and open it again and open listview activity this error appear and says close application?
ReplyDeleteplease help.
Sir i can not add source directly because i am using letest version of sketchware
DeleteSketchware late version is comeback bring addsource directly
DeleteEditText wigit is not working in custom listview. Solution please...
ReplyDeleteCan i add this https://rentedfairly.blogspot.com
ReplyDeleteto save and find my data , if yes then plz let me know how to do .
skranjan27@gmail.com
How to fix that EditText isn't working in Custom ListView:
ReplyDeleteJust add per 'add source directly'-Block this code:
edittext1.setEnabled(true);
edittext1.setClickable(true);
edittext1.setFocusable(true);
edittext1.setFocusableInTouchMode(true);
Kode ini diletakkan dimana bro?
DeleteHow add search function on custom listview?
ReplyDeleteSearch Custom ListView: https://youtu.be/CCgBEtrUFzE
DeleteAnd how add file preference on custom listview?
ReplyDeleteConvert the ListMap to Json String and save that String in file shared preferences.
DeleteOk..i will try
DeleteEscribo diferentes textos que se ingresan a una listview, pero al cerrar y abrir nuevamemte la app la lista esta vacÃa, pueden ayudarme?.. no se casi nada de programacion
ReplyDeleteHow to add Custom List view In Drawer....
ReplyDeleteIt doesn't have a "customv" option for me to choose, when I press the button "customView", it only came out with "none" selection. I can't create a customv
ReplyDeleteHow to show new items first in a list view from firebase
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI want my app run in the background. Like daily alarm app
ReplyDeleteIs there no help?
DeleteYou need to add BackgroundService or BroadcastReceiver. It cannot be done in Sketchware. Maybe be possible in modded Sketchware, I'm not sure.
DeleteCheck these:
https://developer.android.com/guide/components/services
https://developer.android.com/training/scheduling/alarms
Great dear Sanjeev Your page is really helpful.
ReplyDeleteI need to make an app that graph and store in diles the numbers received vÃa Bluetooth. Can You help me with this?
Hope to get your answer.
Regards Lino
hi guys ... excuse me i can't find ( In event ListView: onBindCustomView,) can you help me please
ReplyDeleteMe too, can Not find this.. Help please
DeleteUnder event press plus symbol and in opened menu under view you will find it
DeleteSorry I find Not this.. I see "View ist empty".
Deleteis it possible to use "add source directory" in latest version of sketchware? I've added this in a project, where i used custom listview to show data. but its showing nullpointerexcetin report and app is crashing
ReplyDeleteYes, it is possible
DeleteHow can I show only certain positions in a custom listview?
ReplyDeleteFor example, length of custom listview is 10.
if i click button 1, I want to show only positions 2, 3 and 6 in the custom list view.
Is it possible? How?
How can I show only certain positions in a custom listview?
ReplyDeleteFor example, length of custom listview is 10.
if i click button 1, I want to show only positions 2, 3 and 6 in the custom list view.
Is it possible? How?
Save the list in file shared preferences after creating list. When button 1 is clicked delete all items except position 2,3,6 and display list in ListView
DeleteDo i have to use one single key in the list map? I want to know, because it's not working with multiple keys, but i can't produce single key list maps (i get them from firebase)
ReplyDeleteSanjeev sir, how could we add and use button in each row of custom listview?
ReplyDeleteHi Sanjeev. I need help about customview. I make 15 customview in firebase. Then i made search data in customview. My problem is when i search data 15, the position data 15 become 0. Then when i edit it, the data in position 0 is change not the data 15.
ReplyDeleteI will waiting for your reply
Thank you
How to change a customview to another customview with a block or add soirce directly block? It was annoyed for me when searching
ReplyDeleteHow to display latest chat massage in listview on create activity at bottom.
ReplyDeletePlease reply quickly.
Sir,
ReplyDeleteI cannot add listview onBindCustomView Event.
I not found this onBindCustomView in logic area. Please help me. Thank you.