How can I use ScrollView and AbsoluteLayout in one xml?
-
25-05-2021 - |
Question
I have a problem to include lots of pictures and buttons in the xml, I have tried to ScrollView but pictures and buttons can not be made up as I wanted.
How can i use ScrollView and AbsoluteLayout in one xml so I can include more pictures and buttons in the xml?
Solution
NEVER use AbsoluteLayout! Instead try and recreate your layout using a RelativeLayout
or LinearLayout
.
Remember a ScrollView
can only have a single Child layout, so use a ViewGroup
here.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow