diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:44:00 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:44:00 -0800 |
commit | d24b8183b93e781080b2c16c487e60d51c12da31 (patch) | |
tree | fbb89154858984eb8e41556da7e9433040d55cd4 /tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollPanScan.java | |
parent | f1e484acb594a726fb57ad0ae4cfe902c7f35858 (diff) | |
download | frameworks_base-d24b8183b93e781080b2c16c487e60d51c12da31.zip frameworks_base-d24b8183b93e781080b2c16c487e60d51c12da31.tar.gz frameworks_base-d24b8183b93e781080b2c16c487e60d51c12da31.tar.bz2 |
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollPanScan.java')
-rw-r--r-- | tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollPanScan.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollPanScan.java b/tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollPanScan.java new file mode 100644 index 0000000..bd32828 --- /dev/null +++ b/tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollPanScan.java @@ -0,0 +1,45 @@ +package com.android.imftest.samples; + +import android.app.Activity; +import android.os.Bundle; +import android.view.KeyEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.WindowManager; +import android.widget.LinearLayout; +import android.view.inputmethod.InputMethodManager; +import android.widget.EditText; +import android.widget.Button; +import android.widget.TextView; +import android.widget.ScrollView; + +import com.android.internal.R; + +/* + * Full screen of EditTexts (Scrollable, Pan&Scan) + */ +public class ManyEditTextActivityScrollPanScan extends Activity +{ + private ScrollView mScrollView; + @Override + public void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + mScrollView = new ScrollView(this); + + LinearLayout layout = new LinearLayout(this); + layout.setOrientation(LinearLayout.VERTICAL); + + String string = new String(); + for (int i=0; i<12; i++) + { + final EditText editText = new EditText(this); + editText.setText(string.valueOf(i)); + layout.addView(editText); + } + + mScrollView.addView(layout); + setContentView(mScrollView); + this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); + } +}
\ No newline at end of file |