【发布时间】:2016-10-26 18:38:13
【问题描述】:
潜伏已久,第一次发帖!
我在我的 Kindle Fire 上遇到了一个问题,当我将图像(在本例中为页眉和页脚)插入相对布局并将宽度设置为“match_parent”或“fill_parent”时,出现白色两侧的边框。
但是,当我将图像放入线性布局并设置完全相同的参数时,它可以正常工作。
它在手机和我的三星平板电脑上完美运行,但我无法弄清楚 Fire 出了什么问题。
我希望这里有人能解决这个问题。我无法通过谷歌或 StackOverflow 搜索找到任何关于它的信息。
这是我的标题和相关布局的 XML 代码。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="*****************.MainActivity"
android:background="@drawable/background_xhdpi">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/imageHeader"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:src="@drawable/header_xhdpi"
android:adjustViewBounds="true"/>
(问题示例)
感谢您的宝贵时间!
【问题讨论】:
-
另外,如果有帮助的话,我正在使用 Android Studio。
标签: android android-layout kindle-fire