while fetching the data from database give the respective column as order by desc.
for example
sql = "SELECT * FROM "+Database.tblname+" WHERE ORDER BY "+Database.clcolumnid+" ASC";
SQLiteDatabase sqlite = dbObject.getWritableDatabase();
Cursor cursor = sqlite.rawQuery(sql, null);
More Related Contents:
- Android SQLite data display to ListView
- Android, ListView IllegalStateException: “The content of the adapter has changed but ListView did not receive a notification”
- Android column ‘_id’ does not exist?
- Filtering ListView with custom (object) adapter
- What’s the purpose of item-id’s in Android ListView Adapter?
- android attaching multiple adapters to one adapter
- how to save image taken from camera and show it to listview – crashes with “IllegalStateException”
- Logcat error: “addView(View, LayoutParams) is not supported in AdapterView” in a ListView
- OnItemClickListener doesn’t work with ListView item containing button
- Cannot add header view to list — setAdapter has already been called
- How to get selected list items from a Listview with checkBox and Custom Adapter?
- ArrayIndexOutOfBoundsException with custom Android Adapter for multiple views in ListView
- Unable to save and retrieve String data using Sqlite in android
- Why does the application crash when I press the button to insert the values in the table? [duplicate]
- Pros and Cons of SQLite and Shared Preferences [closed]
- How do I view the SQLite database on an Android device? [duplicate]
- Android P – ‘SQLite: No Such Table Error’ after copying database from assets
- How to ignore accent in SQLite query (Android)
- Store Android SQLite
- Why do I get a “sqlite3: not found” error on a rooted Nexus One when I try to open a database using the adb shell?
- android java.lang.IllegalStateException: Couldn’t read row 0, col 0 from CursorWindow
- How can I insert image in a sqlite database
- Android Alternate row Colors in ListView
- Passing a List from one Activity to another
- Remove all items from RecyclerView
- Sort listview with array adapter
- How to check database on not rooted android device
- How can I set onClickListener on ArrayAdapter?
- How to use notifyDataSetChanged() in thread
- Get SQLite database from Android app