|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xtremelabs.robolectric.shadows.ShadowContext
com.xtremelabs.robolectric.shadows.ShadowContextWrapper
com.xtremelabs.robolectric.shadows.ShadowActivity
@Implements(value=android.app.Activity.class) public class ShadowActivity
Constructor Summary | |
---|---|
ShadowActivity()
|
Method Summary | |
---|---|
void |
assertNoBroadcastListenersRegistered()
Checks the ApplicationContext to see if BroadcastListener s are still registered. |
android.view.View |
findViewById(int id)
Checks to ensure that the contentView has been set |
void |
finish()
|
android.app.Application |
getApplication()
|
android.app.Application |
getApplicationContext()
|
android.view.View |
getContentView()
Non-Android accessor. |
android.content.Intent |
getIntent()
|
android.view.LayoutInflater |
getLayoutInflater()
|
android.app.Activity |
getParent()
|
int |
getResultCode()
Non-Android accessor. |
android.content.Intent |
getResultIntent()
Non-Android accessor. |
android.view.Window |
getWindow()
Constructs a new Window (a TestWindow ) if no window has previously been
set. |
boolean |
isFinishing()
|
void |
onDestroy()
Checks to see if BroadcastListener s are still registered. |
void |
setContentView(int layoutResID)
Sets the contentView for this Activity by invoking the
LayoutInflater |
void |
setContentView(android.view.View view)
|
void |
setIntent(android.content.Intent intent)
|
void |
setResult(int resultCode)
|
void |
setResult(int resultCode,
android.content.Intent data)
|
Methods inherited from class com.xtremelabs.robolectric.shadows.ShadowContextWrapper |
---|
__constructor__, getContentResolver, getNextStartedActivity, getNextStartedService, getPackageManager, getPackageName, getResources, getSharedPreferences, getSystemService, peekNextStartedActivity, peekNextStartedService, registerReceiver, sendBroadcast, startActivity, startService, unregisterReceiver |
Methods inherited from class com.xtremelabs.robolectric.shadows.ShadowContext |
---|
getResourceLoader, getString, getString, getText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShadowActivity()
Method Detail |
---|
@Implementation public final android.app.Application getApplication()
@Implementation public final android.app.Application getApplicationContext()
getApplicationContext
in class ShadowContextWrapper
@Implementation public void setIntent(android.content.Intent intent)
@Implementation public android.content.Intent getIntent()
@Implementation public void setContentView(int layoutResID)
contentView
for this Activity
by invoking the
LayoutInflater
layoutResID
- ID of the layout to inflategetContentView()
@Implementation public void setContentView(android.view.View view)
@Implementation public final void setResult(int resultCode)
@Implementation public final void setResult(int resultCode, android.content.Intent data)
@Implementation public android.view.LayoutInflater getLayoutInflater()
@Implementation public android.view.View findViewById(int id)
contentView
has been set
id
- ID of the view to find
java.lang.RuntimeException
- if the contentView
has not been called first@Implementation public final android.app.Activity getParent()
@Implementation public void finish()
@Implementation public boolean isFinishing()
finish()
was called@Implementation public android.view.Window getWindow()
TestWindow
) if no window has previously been
set.
@Implementation public void onDestroy()
BroadcastListener
s are still registered.
java.lang.RuntimeException
- if any listeners are still registeredassertNoBroadcastListenersRegistered()
public void assertNoBroadcastListenersRegistered()
ApplicationContext
to see if BroadcastListener
s are still registered.
java.lang.RuntimeException
- if any listeners are still registeredShadowApplication.assertNoBroadcastListenersRegistered(android.content.Context, String)
public android.view.View getContentView()
contentView
set by one of the setContentView()
methodspublic int getResultCode()
resultCode
set by one of the setResult()
methodspublic android.content.Intent getResultIntent()
Intent
set by setResult(int, android.content.Intent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |