Scrollview vertical and horizontal in android

Mixing some of the suggestions above, and was able to get a good solution: Custom ScrollView: package com.scrollable.view; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.ScrollView; public class VScroll extends ScrollView { public VScroll(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public VScroll(Context context, AttributeSet attrs) { super(context, attrs); } public VScroll(Context … Read more

ScrollView Inside ScrollView

Try this one Note: Here parentScrollView means Outer ScrollView And childScrollView means Innner ScrollView parentScrollView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { Log.v(TAG, “PARENT TOUCH”); findViewById(R.id.child_scroll).getParent() .requestDisallowInterceptTouchEvent(false); return false; } }); childScrollView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { Log.v(TAG, “CHILD TOUCH”); // Disallow the touch request for parent … Read more

How to use ScrollView in Android?

Just make the top-level layout a ScrollView: <ScrollView xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fillViewport=”true”> <TableLayout android:layout_width=”match_parent” android:layout_height=”match_parent” android:stretchColumns=”1″> <!– everything you already have –> </TableLayout> </ScrollView>

ListView inside ScrollView is not scrolling on Android

I found a solution that works excellently and can scroll the ListView without problems: ListView lv = (ListView)findViewById(R.id.myListView); // your listview inside scrollview lv.setOnTouchListener(new ListView.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { int action = event.getAction(); switch (action) { case MotionEvent.ACTION_DOWN: // Disallow ScrollView to intercept touch events. v.getParent().requestDisallowInterceptTouchEvent(true); break; case MotionEvent.ACTION_UP: // … Read more