Först måste du iterera i dina getUserSLDetails metod i din SQLiteHandler klass
if (cursor.moveToFirst()) {
do {
Datas pMemebr = new Datas();
pMemebr.setSL_DESC(cursor.getString(0));
pMemebr.setTR_DATE(cursor.getString(1));
pMemebr.setACTUAL_BALANCE(cursor.getString(2));
pMemebr.setAVAILABLE_BALANCE(cursor.getString(3));
mMemberDetails.add(pMemebr);
Log.d(TAG, "List<Datas>) Getting members' SL Description: " + cursor.getString(0));
Log.d(TAG, "List<Datas>) Getting members' SL TR Date: " + cursor.getString(1));
Log.d(TAG, "List<Datas>) Getting members' SL Actual Balance: " + cursor.getString(2));
Log.d(TAG, "List<Datas>) Getting members' SL Available Balance: " + cursor.getString(3));
Log.d(TAG, "-------------------------------------------------------------------------");
Log.d(TAG, "List<Datas>) Members's SL Details data: " + pMemebr.toString());
} while (cursor.moveToNext());
}
cursor.close();
return mMemberDetails;
}
Sedan i din MyAdapter du måste ändra metoden nedan -
@Override
public int getItemCount() {
//return mDataset.length;
return mdataset.size();
}
Ta bort loggarna när du har verifierat att din data kommer korrekt.