【问题标题】:Set android background to a specific location将android背景设置为特定位置
【发布时间】:2013-06-06 22:22:04
【问题描述】:

我使用以下代码为活动设置背景:

android:background="@drawable/background"

它有效,但我有一个小问题,图像不应该在整个屏幕上拉伸,我希望图像位于屏幕上的某个特定位置。我该怎么做?

【问题讨论】:

  • 查看布局和图像视图
  • 具体表示你想保存在哪里。 ?页面居中还是居中还是居中?
  • 也许这就是你要找的东西:stackoverflow.com/a/2782035/1176435

标签: java android eclipse


【解决方案1】:

要在页面的任何位置修复图像,您应该使用根布局作为相对布局。因为它可能有很多用户友好的属性,例如 align center inparent,page of bottom align left and below and above 属性所以请尝试一下。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-03-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-30
    相关资源
    最近更新 更多