Scrollview Not Working - Relative Layout
I am trying to wrap a realtive view in a scrollview as per the code below. However the problem is that the view doesn't scroll, even though part of the view is off the screen. I am
Solution 1:
Your RelativeLayout
is horizontal
and you use a ScrollView
, try a HorizontalScrollView
instead.
Solution 2:
I believe this is because the RelativeLayout
doesn't stretch based on content. The ScrollView
will fill the screen and then the RelativeLayout
will fill the ScrollView
. The size of the RelativeLayout
will not change as you put widgets into it.
I would try using another type of layout - perhaps a TableLayout
og a combination of nested LinearLayout
.
Is there any specific reason why you're using the RelativeLayout
?
Post a Comment for "Scrollview Not Working - Relative Layout"