开发者

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.

Android: Linear vs. table layout for a reusable UI component

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜