Android Programming Tutorials
Getting More Active if (item.getItemId()==R.id.add) { startActivity(new Intent(LunchList.this, DetailForm.class)); return(true); ...
Getting More Active return(row); } } static class RestaurantHolder { private TextView name=null; private TextView address=null; ...
Getting More Active EditText notes=null; RadioGroup types=null; RestaurantHelper helper=null; String restaurantId=null; @Overrid ...
Getting More Active } private View.OnClickListener onSave=new View.OnClickListener() { public void onClick(View v) { String type ...
Getting More Active super(context, DATABASE_NAME, null, SCHEMA_VERSION); } @Override public void onCreate(SQLiteDatabase db) { d ...
Getting More Active args); } public String getName(Cursor c) { return(c.getString( 1 )); } public String getAddress(Cursor c) { ...
...
TUTORIAL 13 What's Your Preference? In this tutorial, we will add a preference setting for the sort order of the restaurant list ...
What's Your Preference? This sets up a single-item PreferenceScreen. Note that it references two string arrays, one for the disp ...
What's Your Preference? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPrefe ...
What's Your Preference? /> </menu> We reference an ic_menu_preferences.png file, which you can obtain from the same dir ...
What's Your Preference? Figure 28. The LunchList with the new menu option And if you choose that menu option, you will get the E ...
What's Your Preference? Figure 29. The preferences activity Clicking the Sort Order item will bring up a selection list of avail ...
What's Your Preference? Figure 30. The available sort orders Of course, none of this is actually having any effect on the sort o ...
What's Your Preference? Then, we need to get our hands on our SharedPreferences instance. Add imports to LunchList for android.c ...
What's Your Preference? private SharedPreferences.OnSharedPreferenceChangeListener prefListener= new SharedPreferences.OnSharedP ...
What's Your Preference? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setConte ...
What's Your Preference? about changes). This means you will need to create your own preference UI, rather than rely upon the one ...
...
TUTORIAL 14 Turn, Turn, Turn In this tutorial, we will make our application somewhat more intelligent about screen rotations, en ...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf