use of android.widget.ScrollView in project WordPress-Android by wordpress-mobile.
the class NotificationsSettingsDialogPreference method onCreateDialogView.
@Override
protected View onCreateDialogView() {
ScrollView outerView = new ScrollView(getContext());
outerView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
LinearLayout innerView = new LinearLayout(getContext());
innerView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
innerView.setOrientation(LinearLayout.VERTICAL);
View spacerView = new View(getContext());
int spacerHeight = getContext().getResources().getDimensionPixelSize(R.dimen.margin_medium);
spacerView.setLayoutParams(new ViewGroup.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, spacerHeight));
innerView.addView(spacerView);
outerView.addView(innerView);
configureLayoutForView(innerView);
return outerView;
}
use of android.widget.ScrollView in project Shuttle by timusus.
the class LyricsFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_lyrics, container, false);
rootView.setBackgroundColor(Color.parseColor("#C8000000"));
mLyricsTextView = (TextView) rootView.findViewById(R.id.text1);
mQuickLyricButton = (Button) rootView.findViewById(R.id.btn_quick_lyric);
final GestureDetector gestureDetector = new GestureDetector(this.getActivity(), new GestureListener());
mLyricsTextView.setOnTouchListener((view, motionEvent) -> gestureDetector.onTouchEvent(motionEvent));
ScrollView scrollView = (ScrollView) rootView.findViewById(R.id.scrollView);
ThemeUtils.themeScrollView(scrollView);
return rootView;
}
use of android.widget.ScrollView in project Conversations by siacs.
the class SetPresenceActivity method onCreate.
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_set_presence);
mScrollView = (ScrollView) findViewById(R.id.scroll_view);
mShowSpinner = (Spinner) findViewById(R.id.presence_show);
ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.presence_show_options, R.layout.simple_list_item);
mShowSpinner.setAdapter(adapter);
mShowSpinner.setSelection(1);
mStatusMessage = (EditText) findViewById(R.id.presence_status_message);
mAllAccounts = (CheckBox) findViewById(R.id.all_accounts);
mTemplatesView = (LinearLayout) findViewById(R.id.templates);
final Button changePresence = (Button) findViewById(R.id.change_presence);
changePresence.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
executeChangePresence();
}
});
}
use of android.widget.ScrollView in project libgdx by libgdx.
the class MicroBenchmarks method onCreate.
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
tv = new TextView(this);
sv = new ScrollView(this);
sv.addView(tv);
setContentView(sv);
testThread.start();
}
use of android.widget.ScrollView in project glitch-hq-android by tinyspeck.
the class EncyclopediaSkillsInCategoryFragment method scrollToTop.
protected void scrollToTop() {
ScrollView sv = (ScrollView) m_root.findViewById(R.id.EncyclopediaSkillsInCategoryScrollView);
sv.smoothScrollBy(0, 0);
}
Aggregations