last day (20 days later) » 

9:08 AM
0
Q: Change content of listview on button click(on same screen)

sagar potdarSo In my MainActivity There are 3 rooms(coming from server).when i click on them popup is open.This popup will having shown the list of roomId(clicked on listview item).This works fine. Now I need like this.In popup on click of next button next roomId with api to get its module is call and updat...

 
@Chirag.T:-I dont want like this. wait i post some code so u get better idea.
 
@sagarpotdar call GetallModules task when you click button of dialog.
 
@keyur9779 yes i do this but same output comes.
 
@sagarpotdar create dialog object in class, dismiss it on onClick of right button. In OnPost method just parse the res. update it in list and notify list adapter for data change. instead of creating dialog again show dialog that is already created.
 
@keyur9779 ok thanks.How i create dialog object in a class?? AlertDialog alertDialog = alertDialogBuilder.create(); alertDialog.show();
Sorry not understand.
 
9:08 AM
AlertDialog alertDialog; oncreate(){alertDialog = alertDialogBuilder.create(); } onpost(){ // load list notify list data change // show list dialog with list alertDialog.show(); }
 
ok keyur thanks..
i have one more querry each time their is server call on right button so it is so time consuming what we do to get immediate result??
 
Didnt you got it?
Load data in pagination style .. like load first 10 data than load 10 and than lad 10
for example you have 50 data,
so load first 10 and so on...
up vote if you find my information relevant.

Thank you
 
9:24 AM
but see suppose there are 3 rooms each having multiple modules,switches etc. but problem here if we want all modules of that room at that time call another api.
 
okay than you can change the response of the server.
{
"name":"John",
"cars":[ "Ford", "BMW", "Fiat" ]
}
see this
name: id of the room
Cars : list of items in the rooms
or
cars : multiple modules
 
10:00 AM
okk
 

  last day (20 days later) »