java.lang.Object | ||||||
↳ | android.content.Context | |||||
↳ | android.content.ContextWrapper | |||||
↳ | android.view.ContextThemeWrapper | |||||
↳ | android.app.Activity | |||||
↳ | com.google.android.maps.MapActivity | |||||
↳ | sofia.maps.MapScreen |
Due to implementation details in the Android library, MapScreen
cannot actually extend the Screen class. It does, however, support
all the same helper methods that Screen
supports.
TODO make sure this class is in-sync with Screen
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.app.Activity
| |||||||||||
From class
android.content.Context
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.app.Activity
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MapScreen()
Initializes a new
MapScreen object. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | addContentView(View view, ViewGroup.LayoutParams layout) | ||||||||||
void |
finish(Object result)
Call this method when the current screen is finished and should be
closed.
| ||||||||||
LayoutInflater | getLayoutInflater() | ||||||||||
ScreenMixin |
getScreenMixin()
Not intended to be called by users; this method is public as an
implementation detail.
| ||||||||||
Object | getSystemService(String service) | ||||||||||
void |
log(String message)
Prints an informational message to the system log, tagged with the
"User Log" tag so that it can be easily identified in the LogCat view.
| ||||||||||
boolean | onCreateOptionsMenu(Menu menu) | ||||||||||
boolean | onOptionsItemSelected(MenuItem item) | ||||||||||
void |
presentActivity(Intent intent, String returnMethod)
Starts the activity with the specified intent.
| ||||||||||
void |
presentScreen(Class<? extends Screen> screenClass, Object... args)
Starts the activity represented by the specified
Screen subclass
and slides it into view. | ||||||||||
void | setContentView(View view) | ||||||||||
void | setContentView(int layoutResID) | ||||||||||
void | setContentView(View view, ViewGroup.LayoutParams layout) | ||||||||||
void |
showAlertDialog(String title, String message)
Displays an alert dialog and waits for the user to dismiss it.
| ||||||||||
boolean |
showConfirmationDialog(String title, String message)
Displays a confirmation dialog and waits for the user to select an
option.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
afterInitialize()
Called once the screen has been created and made visible.
| ||||||||||
void |
afterLayoutInflated(boolean inflated)
This method is called after an attempted was made to inflate the
screen's layout.
| ||||||||||
void |
beforeInitialize()
Called before #initialize() during the screen creation process.
| ||||||||||
MapView | getMapView() | ||||||||||
boolean | isRouteDisplayed() | ||||||||||
String |
mapsApiKey()
By default, this method returns the String resource with the ID
| ||||||||||
void |
onActivityResult(int requestCode, int resultCode, Intent data)
Called when a sub-activity returns yielding a result.
| ||||||||||
void |
onCreate(Bundle savedInstanceState)
Called when the activity is created.
| ||||||||||
void | onDestroy() | ||||||||||
void | onPause() | ||||||||||
void | onResume() | ||||||||||
void | onSaveInstanceState(Bundle bundle) | ||||||||||
void | onStop() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.android.maps.MapActivity
| |||||||||||
From class
android.app.Activity
| |||||||||||
From class
android.view.ContextThemeWrapper
| |||||||||||
From class
android.content.ContextWrapper
| |||||||||||
From class
android.content.Context
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.content.ComponentCallbacks
| |||||||||||
From interface
android.view.KeyEvent.Callback
| |||||||||||
From interface
android.view.LayoutInflater.Factory
| |||||||||||
From interface
android.view.View.OnCreateContextMenuListener
| |||||||||||
From interface
android.view.Window.Callback
|
Initializes a new MapScreen
object.
Call this method when the current screen is finished and should be closed. The specified value will be passed back to the previous screen and returned from the #presentScreen(Class, Object...) call that originally presented this screen.
result | the value to pass back to the previous screen |
---|
Not intended to be called by users; this method is public as an implementation detail.
Prints an informational message to the system log, tagged with the "User Log" tag so that it can be easily identified in the LogCat view.
message | the message to log |
---|
Starts the activity with the specified intent. This method will not return until the new activity is dismissed by the user.
intent | an Intent that describes the activity to start |
---|---|
returnMethod | the name of the method to call when the activity returns |
Starts the activity represented by the specified Screen
subclass
and slides it into view. This method will not return until the new
screen is dismissed by the user.
screenClass | the subclass of Screen that will be displayed |
---|---|
args | the arguments to be sent to the screen's initialize
method
|
Displays an alert dialog and waits for the user to dismiss it.
title | the title to display in the dialog |
---|---|
message | the message to display in the dialog |
Displays a confirmation dialog and waits for the user to select an option.
title | the title to display in the dialog |
---|---|
message | the message to display in the dialog |
Called once the screen has been created and made visible.
This method is called after an attempted was made to inflate the
screen's layout. Most users will not need to call or override this
method; it is provided for Sofia's own subclasses of Screen
to
support custom behavior depending on whether a user layout was provided
or not.
Called before #initialize() during the screen creation process. Most users typically will not need to override this method; it is intended for Sofia's own subclasses of Screen so that users can override #initialize() without being required to call the superclass implementation.
By default, this method returns the String resource with the ID
google_maps_api_key
, which acts as a convenient place for
developers to stash this key.
If desired, users who subclass MapScreen
can also override this
method and return their Google Maps API key instead.
Called when a sub-activity returns yielding a result. Subclasses that override this method must call the superclass implementation in order to make sure that built-in methods like #selectImageFromGallery() work correctly.
Called when the activity is created.
savedInstanceState | instance data previously saved by this activity |
---|