开发者

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.开发者_JAVA百科 Each program could start and end at any time so as far as I know a table layout won't work.


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜