【问题标题】:Is there any way to use screen height and width in xml builder in Android?有没有办法在Android的xml builder中使用屏幕高度和宽度?
【发布时间】:2012-08-05 10:03:05
【问题描述】:

有没有办法在 Android 的 xml builder 中使用屏幕高度和宽度?我想在不使用视图重量的情况下将视图高度设置为屏幕的一半。有可能吗?

【问题讨论】:

    标签: android height width screen


    【解决方案1】:

    处理屏幕高度和宽度的最佳方法是在 onCreate() 方法中以编程方式设置视图的大小。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-12
      • 2016-02-25
      • 1970-01-01
      • 2012-11-01
      • 1970-01-01
      相关资源
      最近更新 更多