public class FolderNavigationActivity
extends Activity
Modifier and Type | Class and Description |
---|---|
class |
FolderNavigationActivity.Controller |
protected class |
FolderNavigationActivity.FolderNavigationBoxListItemAdapter
BoxListItemAdapter intended for navigating a folder.
|
protected class |
FolderNavigationActivity.FolderNavigationReceiver
Receiver used to receive broadcasts related to folder navigation.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
clientId |
protected java.lang.String |
clientSecret |
protected static java.lang.String |
EXTRA_BOX_CLIENT_ID |
protected static java.lang.String |
EXTRA_BOX_CLIENT_OAUTH |
protected static java.lang.String |
EXTRA_BOX_CLIENT_SECRET |
protected static java.lang.String |
EXTRA_FOLDER_ID |
protected static java.lang.String |
EXTRA_NAV_NUMBER |
protected static java.lang.String |
EXTRA_SOURCE_TYPE |
protected BoxAndroidClient |
mClient |
protected java.lang.String |
mCurrentFolderId |
protected int |
mNavNumber
Because this activity will launch instances of itself this indicates how deep the activity stack is for these internal activities.
|
Constructor and Description |
---|
FolderNavigationActivity() |
Modifier and Type | Method and Description |
---|---|
protected java.util.concurrent.ThreadPoolExecutor |
getApiExecutor()
General Executor that we will submit our tasks to.
|
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.
|
protected ListView |
getListView() |
android.support.v4.content.LocalBroadcastManager |
getLocalBroadcastManager() |
protected java.lang.String |
getSourceType() |
protected java.util.concurrent.ThreadPoolExecutor |
getThumbnailApiExecutor()
Executor that we will submit thumbnail tasks to.
|
protected void |
handleAuthenticationError()
Handle response if we are unable to authenticate our api calls with the given client.
|
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 |
handleOtherClick(BoxItem item)
Handler response when an item other than a file or folder is clicked on.
|
protected BoxListItemAdapter |
initializeBoxListItemAdapter(ThumbnailManager thumbNailManager) |
protected BroadcastReceiver |
initializeReceiver() |
protected IntentFilter |
initializeReceiverFilters() |
protected ThumbnailManager |
initializeThumbnailManager() |
protected void |
initializeViews() |
void |
onCreate(Bundle savedInstanceState) |
void |
onDestroy() |
protected void |
onDownloadedThumbnail(Intent intent)
Handles showing new thumbnails after they have been downloaded.
|
protected void |
onFetchedFolder(Intent intent)
Handles showing the initial folder after it has been fetched.
|
protected void |
onFetchedFolderItems(Intent intent)
Handles showing other items in the folder after it has been fetched.
|
void |
onItemClick( |
protected void |
onSaveInstanceState(Bundle outState) |
protected static final java.lang.String EXTRA_FOLDER_ID
protected static final java.lang.String EXTRA_BOX_CLIENT_OAUTH
protected static final java.lang.String EXTRA_BOX_CLIENT_ID
protected static final java.lang.String EXTRA_BOX_CLIENT_SECRET
protected static final java.lang.String EXTRA_NAV_NUMBER
protected static final java.lang.String EXTRA_SOURCE_TYPE
protected java.lang.String mCurrentFolderId
protected BoxAndroidClient mClient
protected java.lang.String clientId
protected java.lang.String clientSecret
protected int mNavNumber
public void onCreate(Bundle savedInstanceState)
protected IntentFilter initializeReceiverFilters()
protected BroadcastReceiver initializeReceiver()
protected BoxListItemAdapter initializeBoxListItemAdapter(ThumbnailManager thumbNailManager)
thumbNailManager
- The thumbnail manager provided by initializeThumbnailManager().protected ThumbnailManager initializeThumbnailManager()
protected void initializeViews()
protected ListView getListView()
public void onDestroy()
protected void onSaveInstanceState(Bundle outState)
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 secretprotected void onFetchedFolder(Intent intent)
intent
- the intent containing the results of the network call.protected java.lang.String getSourceType()
protected void onFetchedFolderItems(Intent intent)
intent
- the intent containing the results of the network call.protected void onDownloadedThumbnail(Intent intent)
intent
- protected java.util.concurrent.ThreadPoolExecutor getApiExecutor()
protected java.util.concurrent.ThreadPoolExecutor getThumbnailApiExecutor()
public android.support.v4.content.LocalBroadcastManager getLocalBroadcastManager()
public void onItemClick(listView, View v, int position, long id)
protected void handleFolderClick(BoxAndroidFolder folder)
folder
- The folder clicked on.protected void handleFileClick(BoxAndroidFile file)
file
- The file clicked on.protected void handleOtherClick(BoxItem item)
item
- The item clicked on.protected void handleAuthenticationError()