FileDocCategorySizeDatePackage
ManyEditTextActivityScrollPanScan.javaAPI DocAndroid 5.1 API2055Thu Mar 12 22:22:44 GMT 2015com.android.imftest.samples

ManyEditTextActivityScrollPanScan

public class ManyEditTextActivityScrollPanScan extends android.app.Activity

Fields Summary
public static final int
NUM_EDIT_TEXTS
private android.view.View
mRootView
Constructors Summary
Methods Summary
public android.view.ViewgetRootView()

        return mRootView;
    
public voidonCreate(android.os.Bundle savedInstanceState)


    
        
    
        super.onCreate(savedInstanceState);
        mRootView = new ScrollView(this);

        LinearLayout layout = new LinearLayout(this);
        layout.setOrientation(LinearLayout.VERTICAL);

        for (int i=0; i<NUM_EDIT_TEXTS; i++) 
        {
            final EditText editText = new EditText(this);
            editText.setText(String.valueOf(i));
            editText.setId(i);
            layout.addView(editText);
        }

        ((ScrollView) mRootView).addView(layout);
        setContentView(mRootView);
        this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);