arlen
arlen

Reputation: 1065

Layout for android

I need to have a layout for my widget, but I don't know how to arrage my images on widget screen.

I need to have 4 small Images on first row

then 2 Images on 2nd row

1 Image on 3rd row

and 1 Image on 4th row

Could you please someone create the xml file ?

Upvotes: 0

Views: 216

Answers (3)

Rubycon
Rubycon

Reputation: 18346

LinearLayout(vertical)
    LinearLayout(horizontal)
        ImageView
        ImageView
        ImageView
        ImageView
   LinearLayout(horizontal)
        ImageView
        ImageView
   ImageView
   ImageView

Okay?

Upvotes: 0

Bruiser
Bruiser

Reputation: 11887

Using the hierarchyviewer.bat in your sdk|tools folder along the way might be a very good idea as well.

Upvotes: 0

Alan Haggai Alavi
Alan Haggai Alavi

Reputation: 74202

You could use TableRows within a TableLayout.

Refer Hello TableLayout for an example.

Upvotes: 2

Related Questions