Search in sources :

Example 6 with Include

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

the class IncludeTest method testIncludedWithLayoutParams.

@MediumTest
public void testIncludedWithLayoutParams() throws Exception {
    final Include activity = getActivity();
    final View button1 = activity.findViewById(R.id.included_button);
    final View button2 = activity.findViewById(R.id.included_button_overriden);
    assertTrue("Both buttons should have different width", button1.getLayoutParams().width != button2.getLayoutParams().width);
    assertTrue("Both buttons should have different height", button1.getLayoutParams().height != button2.getLayoutParams().height);
}
Also used : Include(android.view.Include) View(android.view.View) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 7 with Include

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

the class IncludeTest method testIncluded.

@MediumTest
public void testIncluded() throws Exception {
    final Include activity = getActivity();
    final View button1 = activity.findViewById(R.id.included_button);
    assertNotNull("The layout include_button was not included", button1);
    final View button2 = activity.findViewById(R.id.included_button_overriden);
    assertNotNull("The layout include_button was not included with overriden id", button2);
}
Also used : Include(android.view.Include) View(android.view.View) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 8 with Include

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

the class IncludeTest method testIncludedWithVisibility.

@MediumTest
public void testIncludedWithVisibility() throws Exception {
    final Include activity = getActivity();
    final View button1 = activity.findViewById(R.id.included_button_visibility);
    assertEquals("Included button should be invisible", View.INVISIBLE, button1.getVisibility());
}
Also used : Include(android.view.Include) View(android.view.View) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Example 9 with Include

use of android.view.Include in project android_frameworks_base by crdroidandroid.

the class IncludeTest method testIncludedWithSize.

// TODO: needs to be adjusted to pass on non-HVGA displays
// @MediumTest
public void testIncludedWithSize() throws Exception {
    final Include activity = getActivity();
    final View button1 = activity.findViewById(R.id.included_button_with_size);
    final ViewGroup.LayoutParams lp = button1.getLayoutParams();
    assertEquals("Included button should be 23dip x 23dip", 23, lp.width);
    assertEquals("Included button should be 23dip x 23dip", 23, lp.height);
}
Also used : ViewGroup(android.view.ViewGroup) Include(android.view.Include) View(android.view.View)

Example 10 with Include

use of android.view.Include in project android_frameworks_base by crdroidandroid.

the class IncludeTest method testIncluded.

@MediumTest
public void testIncluded() throws Exception {
    final Include activity = getActivity();
    final View button1 = activity.findViewById(R.id.included_button);
    assertNotNull("The layout include_button was not included", button1);
    final View button2 = activity.findViewById(R.id.included_button_overriden);
    assertNotNull("The layout include_button was not included with overriden id", button2);
}
Also used : Include(android.view.Include) View(android.view.View) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Aggregations

Include (android.view.Include)24 View (android.view.View)24 MediumTest (android.test.suitebuilder.annotation.MediumTest)18 ViewGroup (android.view.ViewGroup)6