de.unikassel.android.sdcframework.app
Class SDCFileBrowserActivity

Package class diagram package SDCFileBrowserActivity
java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.view.ContextThemeWrapper
              extended by android.app.Activity
                  extended by de.unikassel.android.sdcframework.app.SDCFileBrowserActivity
All Implemented Interfaces:
ComponentCallbacks, KeyEvent.Callback, LayoutInflater.Factory, View.OnCreateContextMenuListener, Window.Callback, AdapterView.OnItemClickListener

public class SDCFileBrowserActivity
extends Activity
implements AdapterView.OnItemClickListener


Field Summary
private  Button btnChoose
          The choose selection button.
private  ImageButton btnDirUp
          The navigate to parent directory button.
private  File currentDir
          The current directory.
static String FILE
          Intent extra key for the selected file in the activity result.
private  FileListAdapter fileAdapter
          The list view adapter.
private  ListView filesView
          The files list view.
private  FileMatcherFilter filter
          The file matcher filter.
private  TextView pathView
          The path view.
static String PATTERN
          Intent extra key for an optional file pattern
private  File selectedFile
          The selected file.
static String STARTDIR
          Intent extra key for the start directory.
static String TITLE
          Intent extra key for the start directory.
 
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Constructor Summary
SDCFileBrowserActivity()
          Constructor
 
Method Summary
protected  void onChooseSelection()
          Handler for choose selected file
 void onCreate(Bundle savedInstanceState)
           
protected  void onDirUp()
          Handler for directory up navigation
 void onItemClick(AdapterView<?> parent, View view, int position, long id)
           
 void setCurrentDir(File dir)
          Setter for the current directory
private  void setSelection(File file)
          Setter for the selected file.
 
Methods inherited from class android.app.Activity
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getInstanceCount, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLocalClassName, getMenuInflater, getParent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, getWindow, getWindowManager, hasWindowFocus, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, onActivityResult, onApplyThemeResource, onAttachedToWindow, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onDestroy, onDetachedFromWindow, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPause, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareOptionsMenu, onPreparePanel, onRestart, onRestoreInstanceState, onResume, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onStart, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, overridePendingTransition, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, showDialog, showDialog, startActivity, startActivityForResult, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderForResult, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
attachBaseContext, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TITLE

public static final String TITLE
Intent extra key for the start directory.

See Also:
Constant Field Values

STARTDIR

public static final String STARTDIR
Intent extra key for the start directory.

See Also:
Constant Field Values

PATTERN

public static final String PATTERN
Intent extra key for an optional file pattern

See Also:
Constant Field Values

FILE

public static final String FILE
Intent extra key for the selected file in the activity result.

See Also:
Constant Field Values

pathView

private TextView pathView
The path view.


fileAdapter

private FileListAdapter fileAdapter
The list view adapter.


btnDirUp

private ImageButton btnDirUp
The navigate to parent directory button.


btnChoose

private Button btnChoose
The choose selection button.


currentDir

private File currentDir
The current directory.


selectedFile

private File selectedFile
The selected file.


filesView

private ListView filesView
The files list view.


filter

private FileMatcherFilter filter
The file matcher filter.

Constructor Detail

SDCFileBrowserActivity

public SDCFileBrowserActivity()
Constructor

Method Detail

onCreate

public void onCreate(Bundle savedInstanceState)
Overrides:
onCreate in class Activity

setCurrentDir

public void setCurrentDir(File dir)
Setter for the current directory

Parameters:
dir - the directory to set

setSelection

private void setSelection(File file)
Setter for the selected file.

Parameters:
file - the selected file

onItemClick

public void onItemClick(AdapterView<?> parent,
                        View view,
                        int position,
                        long id)
Specified by:
onItemClick in interface AdapterView.OnItemClickListener

onDirUp

protected void onDirUp()
Handler for directory up navigation


onChooseSelection

protected void onChooseSelection()
Handler for choose selected file