Android Sqlite Example (with Spinner)In this example, we are adding a label on button click and displaying all the added labels on the spinner. As you have seen in the previous example, SQLiteOpenHelper class need to be extended for performing operations on the sqlite. We have overridden the onCreate() and onUpgrade() method of SQLiteOpenHelper class in the DatabaseHandler class that provides additional methods to insert and display the labels or data. Android Sqlite Spinner ExampleLet's see the simple code to add and display the string content on spinner using sqlite database. activity_main.xmlFile: activity_main.xml Activity classFile: MainActivity.java DatabaseHandler classFile: DatabaseHandler.java Output:Next TopicAndroid XML Parsing Using Sax Parser |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India