Error In Android Application Extending Baseadapter And Using Asyncktask
i have android application that need connection between android and mysql database using php the application work perfect. only the display user action do not work this method d
Solution 1:
You didn't setDate(), so getDate() is null.
// creating new HashMap
User map = new User();
// adding each child node to HashMap key => valuemap.put(TAG_ID, id);
map.put(TAG_USER, user);
map.put(TAG_DATE, cdate);
I don't see any use of HashMap is any of the code. But for testing, just leave this here.
Add map.setName(user); map.setDate(cdate);
That's it.
Solution 2:
Put this
Log.d(TAG, txtCreateDate == null ? "txtCreateDate is null" : usersList.get(position) == null ? "usersList.get(position) is null" : usersList.get(position).getDate() == null ? "usersList.get(position).getDate() is null" : "nothing is null");
Before
txtCreateDate.setText(usersList.get(position).getDate().toString());
Also, don't you need to initialize your usersList?
Post a Comment for "Error In Android Application Extending Baseadapter And Using Asyncktask"