如何精确放置 android 个 GUI 组件以在大多数屏幕分辨率下统一显示?

How to precislely place android GUI components for uniform display on most of the screen resolutions?

我正在做我的初级 android 大学项目应用程序,后端编程已经完成,现在我正在尝试使用 android studio 设计 GUI,当我放置某个布局和 运行 在 android 模拟器中它看起来不错,但是当我 运行 在真实 android phone 上使用它时,组件搞砸了,有什么方法或工具可以完美放置 android gui 组件,使它们看起来与在模拟器上看起来完全一样。 请帮忙,谢谢

  1. android 有许多布局容器,例如 LinearLayout, CoordinateLayout, ... 您可以在此处找到文档 https://developer.android.com/guide/topics/ui/declaring-layout.html
  2. 根据屏幕尺寸的屏幕密度使用不同的布局 文档 https://developer.android.com/guide/practices/screens_support.html
  3. 对屏幕尺寸使用不同的尺寸
  4. 避免使用 RelativeLayout 这会使内容混乱