FileDocCategorySizeDatePackage
FrameLayoutGravityTest.javaAPI DocAndroid 1.5 API4921Wed May 06 22:42:02 BST 2009com.android.frameworktest.layout.frame

FrameLayoutGravityTest

public class FrameLayoutGravityTest extends android.test.ActivityInstrumentationTestCase

Fields Summary
private android.view.View
mLeftView
private android.view.View
mRightView
private android.view.View
mCenterHorizontalView
private android.view.View
mLeftCenterVerticalView
private android.view.View
mRighCenterVerticalView
private android.view.View
mCenterView
private android.view.View
mLeftBottomView
private android.view.View
mRightBottomView
private android.view.View
mCenterHorizontalBottomView
private android.view.View
mParent
Constructors Summary
public FrameLayoutGravityTest()

        super("com.android.frameworktest", FrameLayoutGravity.class);
    
Methods Summary
protected voidsetUp()

        super.setUp();

        final Activity activity = getActivity();

        mParent = activity.findViewById(R.id.parent);

        mLeftView = activity.findViewById(R.id.left);
        mRightView = activity.findViewById(R.id.right);
        mCenterHorizontalView = activity.findViewById(R.id.center_horizontal);

        mLeftCenterVerticalView = activity.findViewById(R.id.left_center_vertical);
        mRighCenterVerticalView = activity.findViewById(R.id.right_center_vertical);
        mCenterView = activity.findViewById(R.id.center);

        mLeftBottomView = activity.findViewById(R.id.left_bottom);
        mRightBottomView = activity.findViewById(R.id.right_bottom);
        mCenterHorizontalBottomView = activity.findViewById(R.id.center_horizontal_bottom);
    
public voidtestCenterAligned()

        ViewAsserts.assertHorizontalCenterAligned(mParent, mCenterView);
        ViewAsserts.assertVerticalCenterAligned(mParent, mCenterView);
    
public voidtestCenterHorizontalBottomAligned()

        ViewAsserts.assertHorizontalCenterAligned(mParent, mCenterHorizontalBottomView);
        ViewAsserts.assertBottomAligned(mParent, mCenterHorizontalBottomView);
    
public voidtestCenterHorizontalTopAligned()

        ViewAsserts.assertHorizontalCenterAligned(mParent, mCenterHorizontalView);
        ViewAsserts.assertTopAligned(mParent, mCenterHorizontalView);
    
public voidtestLeftBottomAligned()

        ViewAsserts.assertLeftAligned(mParent, mLeftBottomView);
        ViewAsserts.assertBottomAligned(mParent, mLeftBottomView);
    
public voidtestLeftCenterVerticalAligned()

        ViewAsserts.assertLeftAligned(mParent, mLeftCenterVerticalView);
        ViewAsserts.assertVerticalCenterAligned(mParent, mLeftCenterVerticalView);
    
public voidtestLeftTopAligned()

        ViewAsserts.assertLeftAligned(mParent, mLeftView);
        ViewAsserts.assertTopAligned(mParent, mLeftView);
    
public voidtestRightBottomAligned()

        ViewAsserts.assertRightAligned(mParent, mRightBottomView);
        ViewAsserts.assertBottomAligned(mParent, mRightBottomView);
    
public voidtestRightCenterVerticalAligned()

        ViewAsserts.assertRightAligned(mParent, mRighCenterVerticalView);
        ViewAsserts.assertVerticalCenterAligned(mParent, mRighCenterVerticalView);
    
public voidtestRightTopAligned()

        ViewAsserts.assertRightAligned(mParent, mRightView);
        ViewAsserts.assertTopAligned(mParent, mRightView);
    
public voidtestSetUpConditions()

        assertNotNull(mParent);
        assertNotNull(mLeftView);
        assertNotNull(mRightView);
        assertNotNull(mCenterHorizontalView);
        assertNotNull(mLeftCenterVerticalView);
        assertNotNull(mRighCenterVerticalView);
        assertNotNull(mCenterView);
        assertNotNull(mLeftBottomView);
        assertNotNull(mRightBottomView);
        assertNotNull(mCenterHorizontalBottomView);