Home | History | Annotate | Download | only in browser
      1 package com.android.browser;
      2 
      3 import android.content.Intent;
      4 import android.content.res.Configuration;
      5 import android.os.Bundle;
      6 import android.view.ActionMode;
      7 import android.view.ContextMenu;
      8 import android.view.ContextMenu.ContextMenuInfo;
      9 import android.view.KeyEvent;
     10 import android.view.Menu;
     11 import android.view.MenuItem;
     12 import android.view.MotionEvent;
     13 import android.view.View;
     14 
     15 
     16 public interface ActivityController {
     17 
     18     void start(Intent intent);
     19 
     20     void onSaveInstanceState(Bundle outState);
     21 
     22     void handleNewIntent(Intent intent);
     23 
     24     void onResume();
     25 
     26     boolean onMenuOpened(int featureId, Menu menu);
     27 
     28     void onOptionsMenuClosed(Menu menu);
     29 
     30     void onContextMenuClosed(Menu menu);
     31 
     32     void onPause();
     33 
     34     void onDestroy();
     35 
     36     void onConfgurationChanged(Configuration newConfig);
     37 
     38     void onLowMemory();
     39 
     40     boolean onCreateOptionsMenu(Menu menu);
     41 
     42     boolean onPrepareOptionsMenu(Menu menu);
     43 
     44     boolean onOptionsItemSelected(MenuItem item);
     45 
     46     void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo);
     47 
     48     boolean onContextItemSelected(MenuItem item);
     49 
     50     boolean onKeyDown(int keyCode, KeyEvent event);
     51 
     52     boolean onKeyLongPress(int keyCode, KeyEvent event);
     53 
     54     boolean onKeyUp(int keyCode, KeyEvent event);
     55 
     56     void onActionModeStarted(ActionMode mode);
     57 
     58     void onActionModeFinished(ActionMode mode);
     59 
     60     void onActivityResult(int requestCode, int resultCode, Intent intent);
     61 
     62     boolean onSearchRequested();
     63 
     64     boolean dispatchKeyEvent(KeyEvent event);
     65 
     66     boolean dispatchKeyShortcutEvent(KeyEvent event);
     67 
     68     boolean dispatchTouchEvent(MotionEvent ev);
     69 
     70     boolean dispatchTrackballEvent(MotionEvent ev);
     71 
     72     boolean dispatchGenericMotionEvent(MotionEvent ev);
     73 
     74 }
     75