public class ManagerDetailsFragment
extends Fragment
ModuleManagerActivity
Modifier and Type | Class and Description |
---|---|
private class |
ManagerDetailsFragment.FetchModuleJsonFromServer
Contacts a remote host, fetches the Module JSON for
id ,
loads its data and sets up the UI. |
Modifier and Type | Field and Description |
---|---|
private int |
id
ID of the selected Module, used for fetching and storing
|
private Context |
mCtx |
private Module |
mod
The user-selected Module
|
private static java.lang.String |
PREFERENCES_MANAGERDETAILSFRAGMENT_ID |
Constructor and Description |
---|
ManagerDetailsFragment() |
Modifier and Type | Method and Description |
---|---|
void |
onActivityCreated(Bundle savedInstanceState)
Restore fragment state.
|
void |
onButtonClick(View view)
Installs the selected Module.
|
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) |
void |
onPause()
Save fragment state.
|
(package private) void |
setEmpty()
Set the UI to only display a 'no module selected' message
|
(package private) void |
setId(int id) |
(package private) void |
setNotEmpty()
Set the UI to display the standard layout.
|
(package private) void |
update()
Update UI, either sets the UI to the empty UI or fetches the selected Module from the server.
|
private static final java.lang.String PREFERENCES_MANAGERDETAILSFRAGMENT_ID
private Context mCtx
private Module mod
private int id
Module.id
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
public void onActivityCreated(Bundle savedInstanceState)
public void onPause()
void setId(int id)
void update()
public void onButtonClick(View view)
ModuleManagerActivity
to update itself.view
- The View that received the click eventvoid setEmpty()
void setNotEmpty()