FileDocCategorySizeDatePackage
LinearLayoutTest.javaAPI DocAndroid 5.1 API1746Thu Mar 12 22:22:44 GMT 2015com.android.test.layout

LinearLayoutTest

public class LinearLayoutTest extends AbstractLayoutTest

Fields Summary
Constructors Summary
Methods Summary
public android.view.ViewGroupcreate(android.content.Context context)

        LinearLayout container = new LinearLayout(context);
        container.setOrientation(LinearLayout.VERTICAL);

        for (int i = 0; i < VERTICAL_ALIGNMENTS.length; i++) {
            int va = VERTICAL_ALIGNMENTS[i];
            for (int j = 0; j < HORIZONTAL_ALIGNMENTS.length; j++) {
                int ha = HORIZONTAL_ALIGNMENTS[j];
                LayoutParams lp = new LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
                lp.gravity = va | ha;
                View v = create(context, VERTICAL_NAMES[i] + "-" + HORIZONTAL_NAMES[j], 20);
                container.addView(v, lp);
            }
        }

        return container;
    
public java.lang.Stringtag()

        return LinearLayoutTest.class.getName();