I would like to create an app that has two images side by side and two radioButtons, on开发者_开发技巧e down of every image. Which Layout is more suitable for this job (tableLayout, Linear or Relative..)? I have tried it with linear but the images are stacked together.
You can use any of them, with different effort and cost for your application.
The easiest is probably to use a TableLayout, but it's more resourceful.
RelativeLayout is very efficient, but harder to learn and perhaps a little difficult to understand later.
I think you should go with 2 linear Layouts.
- LinearLayout (horizontal)
- LinearLayout (vertical)
- Image
- Radio Button
- LinearLayout (vertical)
- Image
- Radio Button
- LinearLayout (vertical)
If you need the rows to be always exact same height, using TableLayout is not a bad idea too.
精彩评论