Friday, February 15, 2019

Save Data Listview Android

Posted by kingsog on 6:51 AM | No comments





I have to add 2 buttons with each row in listview. the buttons are add and delete. when user selects one of the buttons then some actions should be taken. the user selects data from datepicker.i have. I want to make it so that a user clicks a button to open a dialog, the user types in the name of an item, they click ok, and the item gets added to the listview.. As an active android user i see a common problem in many android apps: they lose the scroll progress i made on a listview after returning from a different view or restarting the app. some apps at least restore the listview to the general area, but not pixel-perfect..





android - SharedPreference adds only one item to ListView ...


Android - sharedpreference adds only one item to listview



When it comes to persisting data in android. there are many choices to use in order to persist data, it depends on what kind of data do you want to save and whether you need to save it private or public.. Most android apps will need to persist user data at sometime. there are different ways to store user data, but sqlite databases are a very convenient and speedy method of saving user (or app) data. For longer persists, you could save your listview data in a shared preferences file or sqlite database and retrieve when you need to use it. let me know if you need clarification with any of the approaches i mentioned above..



visit link reference



0 comments:

Post a Comment