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

FrameLayoutMarginTest

public class FrameLayoutMarginTest extends android.test.ActivityInstrumentationTestCase

Fields Summary
private android.view.View
mLeftView
private android.view.View
mRightView
private android.view.View
mTopView
private android.view.View
mBottomView
private android.view.View
mParent
Constructors Summary
public FrameLayoutMarginTest()

        super("com.android.frameworktest", FrameLayoutMargin.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);
        mTopView = activity.findViewById(R.id.top);
        mBottomView = activity.findViewById(R.id.bottom);
    
public voidtestBottomMarginAligned()

        ViewAsserts.assertBottomAligned(mParent, mBottomView,
                ((ViewGroup.MarginLayoutParams) mBottomView.getLayoutParams()).bottomMargin);
    
public voidtestLeftMarginAligned()

        ViewAsserts.assertLeftAligned(mParent, mLeftView,
                ((ViewGroup.MarginLayoutParams) mLeftView.getLayoutParams()).leftMargin);
    
public voidtestRightMarginAligned()

        ViewAsserts.assertRightAligned(mParent, mRightView,
                ((ViewGroup.MarginLayoutParams) mRightView.getLayoutParams()).rightMargin);
    
public voidtestSetUpConditions()

        assertNotNull(mParent);
        assertNotNull(mLeftView);
        assertNotNull(mRightView);
        assertNotNull(mTopView);
        assertNotNull(mBottomView);
    
public voidtestTopMarginAligned()

        ViewAsserts.assertTopAligned(mParent, mTopView,
                ((ViewGroup.MarginLayoutParams) mTopView.getLayoutParams()).topMargin);