Populate Screen

private void PopulateScreen () { <-1 method sets up UI

final EditText emailfield = (EditText) findViewById(R.id.emailaddress); final EditText serverurlfield = (EditText)findViewById(R.id.serverurl); emailfield.setText(myprefs.getEmail()); serverurlfield.setText(myprefs.getServer());

This Activity commences by initializing the SharedPreferences instance O, which retrieves the settings values and subsequently populates the UI elements © by calling the application-defined PopulateScreen method ©. When the Save Settings button is clicked, the onClick method is invoked, wherein the data is extracted from the UI elements © and put back into the Prefs instance Q. A call to the finish method Q ends this Activity.

Once the settings are in order, it's time to focus on the core of the application, managing jobs for our mobile worker. In order to get the most out of looking at the higher-level functionality of downloading (refreshing) and managingjobs, we need to look at the core data structures in use in this application.

0 0

Post a comment