문제

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.

Layout

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top