AbsActivityStarter
java.lang.Object
AbsActivityStarter
Presents a full-screen viewer for content on the device. The content to
display is denoted by its Uri; it can be any kind of content that
supports the ACTION_VIEW
intent, such as an image, video, sound,
contact card, and many others.
This class should be used from an event handler in a Screen
-like
class. Display the content by calling the start(Activity)
method. When the user returns from viewing the content, the
contentViewerFinished
method will be called on the screen, if it
exists. For example:
public class MyScreen extends Screen { public void buttonClicked() { new ContentViewer(uri).start(this); } public void contentViewerFinished(ContentViewer viewer) { // Do something when the viewer closes, if desired. } }
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
ContentViewer(Uri uri)
Initializes a new content viewer that will display the content at the
specified Uri.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Uri
|
getUri()
Gets the Uri of the content that will be displayed by this
viewer.
| ||||||||||
void
|
setUri(Uri newUri)
Sets the Uri of the content that will be displayed by this
viewer.
| ||||||||||
void
|
start(Activity owner, String method)
Starts the content viewer.
| ||||||||||
void
|
start(Activity owner)
Starts the content viewer.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String
|
getDefaultCallback()
|
Methods inherited from
class
java.lang.Object
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Object
|
clone()
| ||||||||||
boolean
|
equals(Object arg0)
| ||||||||||
void
|
finalize()
| ||||||||||
final
Class<?>
|
getClass()
| ||||||||||
int
|
hashCode()
| ||||||||||
final
void
|
notify()
| ||||||||||
final
void
|
notifyAll()
| ||||||||||
String
|
toString()
| ||||||||||
final
void
|
wait()
| ||||||||||
final
void
|
wait(long arg0, int arg1)
| ||||||||||
final
void
|
wait(long arg0)
|
Initializes a new content viewer that will display the content at the specified Uri.
Gets the Uri of the content that will be displayed by this viewer.
the Uri to the content that will be displayed by this viewer
Sets the Uri of the content that will be displayed by this viewer.
Starts the content viewer. When the user dismisses the viewer, the
owning Activity
(or Screen
) will have the method with
the name specified by method
called.
owner
when the content viewer is dismissed
Starts the content viewer. When the user dismisses the viewer, the
owning Activity
(or Screen
) will have its
contentViewerFinished
method called.