Display and Swipe-to-Delete Data in RecycleView using Cursor
For this blog let assume, I already have the class to interact with sqlite database (Contract, DBHelpler, ContentProvider Classes). Now let start with showing the data using recycleview. I am going to create a todo list app so you will find alot of variables that refer to terms as task/todo list etc. in another article i will be adding its sqlite database class for reference if anyone wants to refere. but here you only find how to display and swipe the data. Display Data in RecycleView 1. Update the UI in the MainActivity.xml file 2. Add new layout resource file with name 'todo_list_item.xml' Right click on layout folder and select 'new' then select 'layout resource file'. Type the name as 'todo_list_item' and select the root element 'Linear Layout'. and lastly click Ok. now replace the below code in the file code. 3. Create a new class 'TodoListAdapter' Before creating a new class, i am going to cre...