Popular posts from this blog
Gridview in Sketchware Project
The Best & Easy Method to Create GRIDVIEW in sketchware CLICK HERE TO DOWNLOAD PROJECT SWB FILE IMPORTANT NOTICE " Check the values & names carefully like ( linear layout names ' listmap names , listview names & do the coding only in onbindcustomview of listview then only it will work when you click on any item of gridview ) " Watch this video it will help you to understand https://youtu.be/V-HxsWJJ5kM

πΆππ€
ReplyDeleteHi
Deleteprivate_data.addListenerForSingleValueEvent(new ValueEventListener() {
ReplyDelete@Override
public void onDataChange(DataSnapshot _dataSnapshot) {
setMap = new ArrayList<>();
try {
GenericTypeIndicator> _ind = new GenericTypeIndicator>() {};
for (DataSnapshot _data : _dataSnapshot.getChildren()) {
HashMap _map = _data.getValue(_ind);
setMap.add(_map);
}
}
catch (Exception _e) {
_e.printStackTrace();
}
position = 0;
for(int _repeat33 = 0; _repeat33 < (int)(setMap.size()); _repeat33++) {
if (setMap.get((int)position).get("uid").toString().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {
newMap = new HashMap<>();
newMap.put("note", setMap.get((int)position).get("note").toString());
newMap.put("title", setMap.get((int)position).get("title").toString());
newMap.put("time", setMap.get((int)position).get("time").toString());
mapList.add(newMap);
}
position++;
}
SketchwareUtil.sortListMap(mapList, "title", false, true);
listview1.setAdapter(new Listview1Adapter(mapList));
((BaseAdapter)listview1.getAdapter()).notifyDataSetChanged();
}
@Override
public void onCancelled(DatabaseError _databaseError) {
}
});
Each time I run this code in the "onChildAdded" the data are always duplicating but whenever I add newMap.clear(); the app will then crash.
Please, can you help me
Please add coin system user
ReplyDeleteplz give link
ReplyDeleteGive me project link
DeleteWhat is this give us link
ReplyDeleteHelo brother please give me spin earning app link please π₯Ίπ₯Ί
ReplyDelete