Android布局,固定尺寸为cm /英寸
什么可以用来确保在Android Studio开发时,容器始终在CM /英寸中始终相同?
我需要将其集中在屏幕中间,无论手机/平板电脑在哪种上运行,以使中间的元素是相同的高度/长度。
谢谢!
What can be used to make sure the container will always be the same size in cm / inches when developing in android studio?
I need it to be centered in the middle of the screen regardless of what phone/tablet is running on so that the element in the middle is same height/length.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用** DP-密度独立的像素**给它进行修复和高度,在不同的屏幕上将具有相同的尺寸。
屏幕中间,取决于您的父viewgroup,例如线性布局,relativelayout,CondertantLayout等
将其放在
Giving it a fix with and height using ** dp - Density-independent Pixels** will have the same size on different screen.
having it in the middle of the screen depend on your parent ViewGroup like Linear layout, relativeLayout, ConstrantLayout etc.
using