Join David Gassner for an in-depth discussion in this video Defining preferences with Java, part of Android SDK: Local Data Storage.
I'm going to start by describing how to set preferences using Java code.…I'm working in a version of my project called PreferencesWithJava.…I've added a few user interface elements, an EditText object, and a couple of…buttons, and the buttons are wired to methods in the main activity class using…attributes in the XML layout file.…Down here, in the button tags, each of the buttons has an onClick attribute.…These are pointing to these methods, which I can jump to by holding down…the Command key on Mac or the Control key on Windows and clicking on the method name.…
Right now, these two methods are just outputting messages to the LOGCAT Console.…I'll run the application in the emulator and then click the Set preferences…button and the Show preferences button and show that my LOGCAT messages are…appearing successfully.…Notice that I've filtered my LOGCAT messages using a filter of tag:…and then the tag name that I'm using in my log class calls.…So now, let's take a look at the code that's needed to add and then retrieve…
- Exploring local data storage options
- Creating an Android virtual device
- Starting a new project
- Defining preferences with Java and activities
- Creating and reading JSON and XML data files
- Creating a new SQLite database
- Inserting and retrieving data in the database
Skill Level Intermediate
1. Getting Started
2. Using Application Preferences
3. Using Internal and External File Storage
4. Working with SQLite Databases
5. Managing and Displaying SQLite Data
Improving the data display9m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.