public class FilePickerActivity extends FolderNavigationActivity
FolderNavigationActivity.Controller, FolderNavigationActivity.FolderNavigationBoxListItemAdapter, FolderNavigationActivity.FolderNavigationReceiver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTRA_BOX_ANDROID_FILE |
protected static java.lang.String |
EXTRA_BOX_ANDROID_FOLDER |
protected static java.lang.String |
EXTRA_FOLDER_NAME
Used to keep track of whether or not this is the first activity launched
|
protected BoxAndroidFolder |
mCurrentFolder |
protected java.lang.String |
mFolderName |
clientId, clientSecret, EXTRA_BOX_CLIENT_ID, EXTRA_BOX_CLIENT_OAUTH, EXTRA_BOX_CLIENT_SECRET, EXTRA_FOLDER_ID, EXTRA_NAV_NUMBER, EXTRA_SOURCE_TYPE, mClient, mCurrentFolderId, mNavNumber
Constructor and Description |
---|
FilePickerActivity() |
Modifier and Type | Method and Description |
---|---|
static Intent |
getLaunchIntent(Context context,
java.lang.String folderId,
BoxAndroidOAuthData oauth,
java.lang.String clientId,
java.lang.String clientSecret)
Create an intent to launch an instance of this activity to navigate folders.
|
static Intent |
getLaunchIntent(Context context,
java.lang.String folderName,
java.lang.String folderId,
BoxAndroidOAuthData oauth,
java.lang.String clientId,
java.lang.String clientSecret)
Create an intent to launch an instance of this activity to navigate folders.
|
protected ListView |
getListView() |
protected Spinner |
getNavigationSpinner()
Return the spinner used to navigate up folder heirarchy.
|
protected java.lang.String |
getSourceType() |
protected void |
handleFileClick(BoxAndroidFile file)
Handle response when a file is clicked on.
|
protected void |
handleFolderClick(BoxAndroidFolder folder)
Handle response when a folder is clicked on.
|
protected void |
initializeViews() |
protected void |
onActivityResult(int requestCode,
int resultCode,
Intent data) |
void |
onCreate(Bundle savedInstanceState) |
protected void |
onFetchedFolder(Intent intent)
Handles showing the initial folder after it has been fetched.
|
protected void |
onResume() |
protected void |
onSaveInstanceState(Bundle outState) |
protected void |
setNavigationSpinner(BoxAndroidFolder currentFolder)
Shows a navigation spinner with all items in the provided folder.
|
protected void |
setNavigationSpinner(NavigationItem navigationItem)
Shows a single navigation item in the spinner.
|
getApiExecutor, getLocalBroadcastManager, getThumbnailApiExecutor, handleAuthenticationError, handleOtherClick, initializeBoxListItemAdapter, initializeReceiver, initializeReceiverFilters, initializeThumbnailManager, onDestroy, onDownloadedThumbnail, onFetchedFolderItems, onItemClick
public static final java.lang.String EXTRA_BOX_ANDROID_FILE
protected static final java.lang.String EXTRA_BOX_ANDROID_FOLDER
protected static final java.lang.String EXTRA_FOLDER_NAME
protected java.lang.String mFolderName
protected BoxAndroidFolder mCurrentFolder
public void onCreate(Bundle savedInstanceState)
onCreate
in class FolderNavigationActivity
protected void onResume()
protected Spinner getNavigationSpinner()
protected void onActivityResult(int requestCode, int resultCode, Intent data)
protected void onSaveInstanceState(Bundle outState)
onSaveInstanceState
in class FolderNavigationActivity
protected void initializeViews()
initializeViews
in class FolderNavigationActivity
protected ListView getListView()
getListView
in class FolderNavigationActivity
protected void handleFileClick(BoxAndroidFile file)
FolderNavigationActivity
handleFileClick
in class FolderNavigationActivity
file
- The file clicked on.protected void onFetchedFolder(Intent intent)
FolderNavigationActivity
onFetchedFolder
in class FolderNavigationActivity
intent
- the intent containing the results of the network call.protected void handleFolderClick(BoxAndroidFolder folder)
FolderNavigationActivity
handleFolderClick
in class FolderNavigationActivity
folder
- The folder clicked on.public static Intent getLaunchIntent(Context context, java.lang.String folderId, BoxAndroidOAuthData oauth, java.lang.String clientId, java.lang.String clientSecret)
context
- current context.folderId
- folder id to navigate.oauth
- oauth data for client.clientId
- client idclientSecret
- client secretpublic static Intent getLaunchIntent(Context context, java.lang.String folderName, java.lang.String folderId, BoxAndroidOAuthData oauth, java.lang.String clientId, java.lang.String clientSecret)
context
- current context.folderName
- Name to show in the navigation spinner. Should be name of the folder.folderId
- folder id to navigate.oauth
- oauth data for client.clientId
- client idclientSecret
- client secretprotected void setNavigationSpinner(NavigationItem navigationItem)
navigationItem
- The navigation item to show.protected void setNavigationSpinner(BoxAndroidFolder currentFolder)
currentFolder
- The folder to show in the navigation spinner.protected java.lang.String getSourceType()
getSourceType
in class FolderNavigationActivity