Does Android have the equivalent of a JPanel?

六眼飞鱼酱① 提交于 2019-12-10 09:45:11

问题


Is there an Android equivalent to Java's panel? I need something with a set size that I can add different views in dynamically. Is there such a technique?

I'm basically wanting a blank area with a set size in xml code where I can add buttons later through the activity. The reason for adding later is the number of buttons and size of the buttons will range dramatically, but still needing the area to fill.


回答1:


There isn't a JPanel class in Android but you can use layouts just as effectively. Check out this link.



来源:https://stackoverflow.com/questions/11044984/does-android-have-the-equivalent-of-a-jpanel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!