开发者

How to add Views dynamically or on top of other components?

I use a LinearLayout and first I have a MapView and below the map I have a TableLayout with informations fields.

Now I would like to add additional information fields (e.g. a new TableLayout) when the user select a specific menu item on the Options Menu. I would like to have these fields either between the MapView and the TableLayout, or on top of the bottom area of the MapView.

How can I add this T开发者_开发百科ableLayout with additional information fields dynamically after the user has selected a menu item? How can I show it below the MapView or on top of the bottom area of the MapView?


Consider using ViewStubs for hidden on-demand view. If you need to display something on top of other view, you can use another container to hold the MapView and the stub, FrameLayout could be a good candidate.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜