Search in sources :

Example 46 with ScrollView

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;
}
Also used : ScrollView(android.widget.ScrollView) ViewGroup(android.view.ViewGroup) TextView(android.widget.TextView) ScrollView(android.widget.ScrollView) View(android.view.View) LinearLayout(android.widget.LinearLayout)

Example 47 with ScrollView

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;
}
Also used : ScrollView(android.widget.ScrollView) GestureDetector(android.view.GestureDetector) View(android.view.View) TextView(android.widget.TextView) ScrollView(android.widget.ScrollView)

Example 48 with ScrollView

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();
        }
    });
}
Also used : ImageButton(android.widget.ImageButton) Button(android.widget.Button) View(android.view.View) TextView(android.widget.TextView) ScrollView(android.widget.ScrollView) ArrayAdapter(android.widget.ArrayAdapter)

Example 49 with ScrollView

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();
}
Also used : ScrollView(android.widget.ScrollView) TextView(android.widget.TextView)

Example 50 with ScrollView

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);
}
Also used : ScrollView(android.widget.ScrollView)

Aggregations

ScrollView (android.widget.ScrollView)363 View (android.view.View)173 TextView (android.widget.TextView)149 LinearLayout (android.widget.LinearLayout)93 ImageView (android.widget.ImageView)65 ViewGroup (android.view.ViewGroup)53 Button (android.widget.Button)36 EditText (android.widget.EditText)36 ListView (android.widget.ListView)29 RecyclerView (android.support.v7.widget.RecyclerView)25 Intent (android.content.Intent)24 AbsListView (android.widget.AbsListView)24 AdapterView (android.widget.AdapterView)24 GridLayout (android.widget.GridLayout)24 ArrayList (java.util.ArrayList)21 SuppressLint (android.annotation.SuppressLint)20 WebView (android.webkit.WebView)19 FrameLayout (android.widget.FrameLayout)19 Dialog (android.app.Dialog)17 DialogInterface (android.content.DialogInterface)16