Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top