Search in sources :

Example 1 with StubbedView

use of android.view.StubbedView in project android_frameworks_base by ParanoidAndroid.

the class ViewStubTest method testInflated.

@UiThreadTest
@MediumTest
public void testInflated() throws Exception {
    final StubbedView activity = getActivity();
    final ViewStub stub = (ViewStub) activity.findViewById(R.id.viewStub);
    final View swapped = stub.inflate();
    assertNotNull("The inflated view is null", swapped);
}
Also used : ViewStub(android.view.ViewStub) StubbedView(android.view.StubbedView) StubbedView(android.view.StubbedView) View(android.view.View) UiThreadTest(android.test.UiThreadTest) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 2 with StubbedView

use of android.view.StubbedView in project android_frameworks_base by ParanoidAndroid.

the class ViewStubTest method testInflatedId.

@UiThreadTest
@MediumTest
public void testInflatedId() throws Exception {
    final StubbedView activity = getActivity();
    final ViewStub stub = (ViewStub) activity.findViewById(R.id.viewStubWithId);
    final View swapped = stub.inflate();
    assertNotNull("The inflated view is null", swapped);
    assertTrue("The inflated view has no id", swapped.getId() != View.NO_ID);
    assertTrue("The inflated view has the wrong id", swapped.getId() == R.id.stub_inflated);
}
Also used : ViewStub(android.view.ViewStub) StubbedView(android.view.StubbedView) StubbedView(android.view.StubbedView) View(android.view.View) UiThreadTest(android.test.UiThreadTest) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 3 with StubbedView

use of android.view.StubbedView in project android_frameworks_base by ParanoidAndroid.

the class ViewStubTest method testStubbed.

@MediumTest
public void testStubbed() throws Exception {
    final StubbedView activity = getActivity();
    final View stub = activity.findViewById(R.id.viewStub);
    assertNotNull("The ViewStub does not exist", stub);
}
Also used : StubbedView(android.view.StubbedView) StubbedView(android.view.StubbedView) View(android.view.View) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 4 with StubbedView

use of android.view.StubbedView in project android_frameworks_base by ResurrectionRemix.

the class ViewStubTest method testInflated.

@UiThreadTest
@MediumTest
public void testInflated() throws Exception {
    final StubbedView activity = getActivity();
    final ViewStub stub = (ViewStub) activity.findViewById(R.id.viewStub);
    final View swapped = stub.inflate();
    assertNotNull("The inflated view is null", swapped);
}
Also used : ViewStub(android.view.ViewStub) StubbedView(android.view.StubbedView) StubbedView(android.view.StubbedView) View(android.view.View) UiThreadTest(android.test.UiThreadTest) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 5 with StubbedView

use of android.view.StubbedView in project android_frameworks_base by ResurrectionRemix.

the class ViewStubTest method testInflatedId.

@UiThreadTest
@MediumTest
public void testInflatedId() throws Exception {
    final StubbedView activity = getActivity();
    final ViewStub stub = (ViewStub) activity.findViewById(R.id.viewStubWithId);
    final View swapped = stub.inflate();
    assertNotNull("The inflated view is null", swapped);
    assertTrue("The inflated view has no id", swapped.getId() != View.NO_ID);
    assertTrue("The inflated view has the wrong id", swapped.getId() == R.id.stub_inflated);
}
Also used : ViewStub(android.view.ViewStub) StubbedView(android.view.StubbedView) StubbedView(android.view.StubbedView) View(android.view.View) UiThreadTest(android.test.UiThreadTest) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Aggregations

MediumTest (android.test.suitebuilder.annotation.MediumTest)24 StubbedView (android.view.StubbedView)24 View (android.view.View)24 UiThreadTest (android.test.UiThreadTest)18 ViewStub (android.view.ViewStub)18