use of android.widget.ScrollView in project android_frameworks_base by ResurrectionRemix.
the class ManyEditTextActivityScrollPanScan method onCreate.
@Override
public void onCreate(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);
}
use of android.widget.ScrollView in project android_frameworks_base by ResurrectionRemix.
the class ManyEditTextActivityScrollResize method onCreate.
@Override
public void onCreate(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);
}
use of android.widget.ScrollView in project android_frameworks_base by ResurrectionRemix.
the class OneEditTextActivitySelected method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
mRootView = new ScrollView(this);
EditText editText = new EditText(this);
editText.requestFocus();
mDefaultFocusedView = editText;
layout.addView(editText);
((ScrollView) mRootView).addView(layout);
setContentView(mRootView);
// set to resize so IME is always shown (and also so
// ImfBaseTestCase#destructiveCheckImeInitialState thinks it should always be shown
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
}
use of android.widget.ScrollView in project android_frameworks_base by ResurrectionRemix.
the class BigEditTextActivityScrollablePanScan method onCreate.
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
mRootView = new ScrollView(this);
((ScrollView) mRootView).setFillViewport(true);
mRootView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.VERTICAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
View view = getLayoutInflater().inflate(R.layout.full_screen_edit_text, ((ScrollView) mRootView), false);
mLayout.addView(view);
((ScrollView) mRootView).addView(mLayout);
mDefaultFocusedView = view.findViewById(R.id.data);
setContentView(mRootView);
}
use of android.widget.ScrollView in project android_frameworks_base by ResurrectionRemix.
the class GlyphCacheActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ScrollView scrollView = new ScrollView(this);
scrollView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
scrollView.addView(layout);
while (mTotalChars < 10000) {
layout.addView(createTextView());
}
setContentView(scrollView);
}
Aggregations