1

Hi in my application the screen is so large which contains a gridview with images and listview with lot of list items and also so many text views existed in my screen. so that i placed this content in scrollview to view on the mobile screen. When I placed the content in the scrollview then the gridview/listview scroll is not working.

Is there any way to solve this issue. I referred so many links but i could not get the solution.

The links are Grid of images inside ScrollView How can I put a ListView into a ScrollView without it collapsing?

etc

enter image description here

Community
  • 1
  • 1
NaseerKhan
  • 65
  • 2
  • 10

1 Answers1

3

You can solve it using following code, but I suggest please change UI, it is not according android guideline. it' easily scrolled in iPhone interface.

final ScrollView childScroll = (ScrollView)
view.findViewById(R.id.resourceactivity_sv_classes_detail);

parentScroll.setOnTouchListener(new View.OnTouchListener() {

public boolean onTouch(View v, MotionEvent event) {
//Log.v(TAG,"PARENT TOUCH");
childScroll.getParent().requestDisallowInterceptTouchEvent
(false); return false; } }); childScroll.setOnTouchListener(new
View.OnTouchListener() {

public boolean onTouch(View v, MotionEvent event) {
//Log.v(TAG,"CHILD TOUCH");
v.getParent().requestDisallowInterceptTouchEvent(true); return
false; } });   

You can modify gridview instead of child scrollview.

Pang
  • 9,564
  • 146
  • 81
  • 122
milan manvar
  • 238
  • 2
  • 11