use of android.view.StubbedView in project android_frameworks_base by DirtyUnicorns.
the class ViewStubTest method testInflatedLayoutParams.
@UiThreadTest
@MediumTest
public void testInflatedLayoutParams() 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);
assertEquals("Both stub and inflated should same width", stub.getLayoutParams().width, swapped.getLayoutParams().width);
assertEquals("Both stub and inflated should same height", stub.getLayoutParams().height, swapped.getLayoutParams().height);
}
use of android.view.StubbedView in project android_frameworks_base by DirtyUnicorns.
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);
}
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);
}
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);
}
use of android.view.StubbedView in project android_frameworks_base by ResurrectionRemix.
the class ViewStubTest method testInflatedLayoutParams.
@UiThreadTest
@MediumTest
public void testInflatedLayoutParams() 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);
assertEquals("Both stub and inflated should same width", stub.getLayoutParams().width, swapped.getLayoutParams().width);
assertEquals("Both stub and inflated should same height", stub.getLayoutParams().height, swapped.getLayoutParams().height);
}
Aggregations