1 package org.openintents.filemanager;
\r
3 import android.app.Dialog;
\r
4 import android.app.ListActivity;
\r
5 import android.os.Bundle;
\r
6 import android.view.Menu;
\r
7 import android.view.MenuItem;
\r
9 public class DistributionLibraryListActivity extends ListActivity {
\r
11 protected static final int MENU_DISTRIBUTION_START = Menu.FIRST;
\r
13 protected static final int DIALOG_DISTRIBUTION_START = 1;
\r
15 protected DistributionLibrary mDistribution;
\r
17 /** Called when the activity is first created. */
\r
19 protected void onCreate(Bundle savedInstanceState) {
\r
20 super.onCreate(savedInstanceState);
\r
22 mDistribution = new DistributionLibrary(this, MENU_DISTRIBUTION_START, DIALOG_DISTRIBUTION_START);
\r
26 public boolean onCreateOptionsMenu(Menu menu) {
\r
27 super.onCreateOptionsMenu(menu);
\r
28 mDistribution.onCreateOptionsMenu(menu);
\r
33 public boolean onOptionsItemSelected(MenuItem item) {
\r
34 if (mDistribution.onOptionsItemSelected(item)) {
\r
37 return super.onOptionsItemSelected(item);
\r
41 protected Dialog onCreateDialog(int id) {
\r
42 return mDistribution.onCreateDialog(id);
\r
46 protected void onPrepareDialog(int id, Dialog dialog) {
\r
47 super.onPrepareDialog(id, dialog);
\r
48 mDistribution.onPrepareDialog(id, dialog);
\r