JaRMoS
1.1
Java Reduced Model Simulations
|
This activity generates a simple ListView to allow selection of a model. More...
Public Member Functions | |
void | onCreateContextMenu (ContextMenu menu, View v, ContextMenuInfo menuInfo) |
boolean | onContextItemSelected (MenuItem item) |
Static Public Attributes | |
static final int | NO_MODELS_DIALOG_ID = 2 |
Dialog ID for the dialog that tells the user there are no models for the selected source. More... | |
static final int | NOSRC_DIALOG_ID = 1 |
Dialog ID for the case of an invalid or nonexistent Source ID. More... | |
Protected Member Functions | |
void | onActivityResult (int requestCode, int resultCode, Intent data) |
void | onCreate (Bundle savedInstanceState) |
Dialog | onCreateDialog (int id) |
Helper method that takes a list of folders and a source which creates the ModelDescriptors using the ModelManager class. More... | |
This activity generates a simple ListView to allow selection of a model.
Renamed the former CaptionImageAdapter to ModelsGridViewAdapter.
Depending on the selected Source (passed in the Intent-IntExtra "Source") a list (compiled at runtime) from the asset or sd card folder contents is displayed. The Source ID's are defined in the ModelManager class.
In difference to the former version (which worked with "demo+position" folders) the GridView items are now of a small private class containing the model folder name, the title and a Drawable as thumbnail. Those items are used to populate the GridView in the ModelsGridViewAdapter.getView() method. This way, the models can be loaded dynamically at runtime. This allows to add models to the SD-Card (or exchange it) and run them straightaway.
Definition at line 57 of file ModelListActivity.java.
|
protected |
Definition at line 155 of file ModelListActivity.java.
boolean jarmos.app.activity.ModelListActivity.onContextItemSelected | ( | MenuItem | item | ) |
Definition at line 294 of file ModelListActivity.java.
|
protected |
Definition at line 163 of file ModelListActivity.java.
void jarmos.app.activity.ModelListActivity.onCreateContextMenu | ( | ContextMenu | menu, |
View | v, | ||
ContextMenuInfo | menuInfo | ||
) |
Definition at line 283 of file ModelListActivity.java.
|
protected |
Helper method that takes a list of folders and a source which creates the ModelDescriptors using the ModelManager class.
Parses the corresponding "model.xml" file which is (so far) of the structure { <rbappmodel title="SomeTitle" image="someimage.png">} The title and image attributes are used for the GridView.
folders | The model folder names |
src | The Source - See ModelManager SRC_ constants. |
Definition at line 253 of file ModelListActivity.java.
|
static |
Dialog ID for the dialog that tells the user there are no models for the selected source.
Definition at line 137 of file ModelListActivity.java.
|
static |
Dialog ID for the case of an invalid or nonexistent Source ID.
Definition at line 142 of file ModelListActivity.java.