Sarevok
Sarevok

Reputation: 437

Possible to use null layout in Android?

Is there an equivalent to Java's null layout in Android? Basically I want to specify the x and y coordinates of each component and not have the layout manager choose where they go. They will be within a scroll pane so it doesn't matter whether they fit on the screen.

I know null layouts are generally not a good idea but I have a special case where I need it. I'm porting a Java TV guide app and the program grid is made up of JLabels. The program dynamically generates them all, setting the x and y coords based on start/end time and channel. Each program could start and end at any time so as far as I know a table layout won't work.

Upvotes: 1

Views: 2701

Answers (1)

Jeff Barger
Jeff Barger

Reputation: 1239

There used to be AbsoluteLayout, but it is now deprecated. The docs recommend using RelativeLayout or FrameLayout instead.

Upvotes: 2

Related Questions