Android: Linear vs. table layout for a reusable UI component
I'm trying to define a reusable layout element I want to include in another layout. But I'm not sure what's the best way to archive the layout I want.
The reusable component should look like this.
It should be separated into 3 areas. Each area will get a separate background image.The both areas on the left should each contain 2 TextViews whereas the right area should contain 3 TextViews. The whole component should fill the width of the screen.
I've already started开发者_开发问答 to build the layout but I'm still not sure whether to do it by nesting multiple LinearLayouts or by using a TableLayout.
Which way should I go? Or would you suggest a totally different approach?
Have a RelativeLayout
or LinearLayout
as parent. Inside it take a LinearLayout
for left and RelativeLayout
for right.
On left take a TableLayout
.this should give the required layout.
精彩评论