public class ModuleManagerActivity extends Activity implements ManagerListFragment.OnModuleSelectedListener
Modifier and Type | Class and Description |
---|---|
private class |
ModuleManagerActivity.fetchAndInstallSelection
Downloads and installs all the modules in
selection |
private class |
ModuleManagerActivity.FetchListJsonFromServer
Downloads a list of available modules and displays its contents, minus the modules that are already installed,
in
ManagerListFragment |
Modifier and Type | Field and Description |
---|---|
private ActionMode |
mActionMode
reference to the Activity's ActionMode, is null if the Activity is not in ActionMode
|
static ModuleListAdapter |
mAdapter
Adapter used by this Activity's ListView.
|
private static java.lang.String |
PREFERENCES_MODULEMANAGERACTIVITY_SELECTIONPOSITION |
private java.util.List<Module> |
selection
when in ActionMode, this List contains all the Modules the user currently has
selected.
|
private int |
selectionPosition
The index of the current selection in the ListView
|
static java.util.List<Module> |
shownModuleList
List of currently shown Modules in the ListView,
|
Constructor and Description |
---|
ModuleManagerActivity() |
Modifier and Type | Method and Description |
---|---|
void |
onButtonClick(View v)
Defer onClick() event to
ManagerDetailsFragment (tablet only) |
protected void |
onCreate(Bundle savedInstanceState)
Loads saved state and preferences and sets up the context actionbar (CAB).
|
void |
onModuleSelected(int position)
Shows the selected Module in detail, either by updating
ManagerDetailsFragment if available or otherwise
starting an Intent for ManagerDetailActivity |
protected void |
onPause() |
protected void |
onSaveInstanceState(Bundle outState) |
private static final java.lang.String PREFERENCES_MODULEMANAGERACTIVITY_SELECTIONPOSITION
private int selectionPosition
private java.util.List<Module> selection
private ActionMode mActionMode
public static ModuleListAdapter mAdapter
public static final java.util.List<Module> shownModuleList
protected void onCreate(Bundle savedInstanceState)
savedInstanceState
- the previously saved instance state, can be null.protected void onPause()
protected void onSaveInstanceState(Bundle outState)
public void onModuleSelected(int position)
ManagerDetailsFragment
if available or otherwise
starting an Intent for ManagerDetailActivity
onModuleSelected
in interface ManagerListFragment.OnModuleSelectedListener
position
- The position in the ListView of the user selectionpublic void onButtonClick(View v)
ManagerDetailsFragment
(tablet only)v
- The view that was clicked