Sofia API Reference

  • Package Index
  • Class Index
  • Packages
  • sofia.app
    • Interfaces
    • ScreenMethods
    • Classes
    • ActivityStarter
    • ListScreen
    • Screen
    • ShapeScreen
    • Annotations
    • OptionsMenu
    • Persistent
    • Persistor
    • ScreenLayout
  • sofia.content
  • sofia.data
  • sofia.graphics
  • sofia.util
  • sofia.view
  • sofia.widget

public interface
ScreenMethods

Inheritance

  • sofia.app.ScreenMethods
Known Indirect Subclasses
InspectorScreen, ListScreen<E>, Screen, ShapeScreen
InspectorScreen  
ListScreen<E>

ListScreen is a subclass of screen that provides a built-in ListView and convenience methods for manipulating the list directly in the screen class instead of having to call getListView() for every operation. 

Screen The Screen class represents a single screen in an Android application. 
ShapeScreen

ShapeScreen is a subclass of screen that provides a built-in ShapeView and convenience methods for manipulating shapes directly in the screen class instead of having to call getShapeView() for every operation. 


Class Overview

Lists the common methods that are provided by classes like Screen, MapScreen, and other "Screen-like" classes that cannot be in the same class hierarchy as Screen.


Summary

Public Methods
abstract void finish(Object result)
Call this method when the current screen is finished and should be closed.
abstract void presentActivity(Intent intent, String returnMethod)
Starts the activity with the specified intent.
abstract void presentScreen(Class<? extends Activity> screenClass, Object... args)
Starts the activity represented by the specified screen class and slides it into view.
abstract void showAlertDialog(String title, String message)
Displays an alert dialog and waits for the user to dismiss it.
abstract boolean showConfirmationDialog(String title, String message)
Displays a confirmation dialog and waits for the user to select an option.

Public Methods

public abstract void finish (Object result)

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.

Parameters
result
the value to pass back to the previous screen
public abstract void presentActivity (Intent intent, String returnMethod)

Starts the activity with the specified intent. This method will not return until the new activity is dismissed by the user.

Parameters
intent
an Intent that describes the activity to start
returnMethod
the name of the method to call when the activity returns
public abstract void presentScreen (Class<? extends Activity> screenClass, Object... args)

Starts the activity represented by the specified screen class and slides it into view. This method returns immediately even as the screen is being presented, but at that point a new screen has taken over the user's attention and the old one might be discarded from memory at any time. Therefore, users should typically not do any important computation after calling this method.

Parameters
screenClass
the screen that will be displayed
args
the arguments to be sent to the new screen's initialize method
public abstract void showAlertDialog (String title, String message)

Displays an alert dialog and waits for the user to dismiss it.

Parameters
title
the title to display in the dialog
message
the message to display in the dialog
public abstract boolean showConfirmationDialog (String title, String message)

Displays a confirmation dialog and waits for the user to select an option.

Parameters
title
the title to display in the dialog
message
the message to display in the dialog
Returns

true if the user clicked the "Yes" option; false if the user clicked the "No" option or cancelled the dialog (for example, by pressing the Back button)