在 LinearLayout 中调整 SurfaceView 的大小
我在 LinearLayout
中遇到了多个 SurfaceViews
的小问题。如何调整(缩小)其中一个视图的大小,以便它不会在其旁边创建黑色空间,这意味着相邻视图将移动到调整大小的视图旁边。有什么想法吗? 谢谢!
I have a small problem with multiple SurfaceViews
in a LinearLayout
. How can I resize(shrink) one of the views so that it doesn't create a black space next to it, meaning the neighbour view is being moved next to the resized view. Any ideas?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为此,您最好使用 RelativeLayout。
使用 LinearLayout,一切都是线性绘制。
这意味着您只能垂直或水平绘制内容,并且必须在该布局内声明一个新的布局才能更改它。
尝试阅读有关RelativeLayout的内容,如果您需要其他帮助,请返回此处。如果您不明白,我一定会回复您:)
希望这有帮助!
For this purpose, you might be better off using a RelativeLayout.
With a LinearLayout, everything is linearly drawn.
This means that you can only draw things vertically or horizontally, and you have to declare a new Layout inside of that layout in order to change that.
Try reading about RelativeLayout, and post back here if you need additional help. I'll make sure to get back to you if you don't understand :)
Hope this helps!