0

相同的 XML 在 Android 4.3 和 4.4 中看起来不同。问题是Kitkat(4.4)没有拿起这条线:"android:background="@drawable/darkgray"(darkgray.jpg是一个img)

为什么 Kitkat 的行为有所不同?

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.mavdev.focusoutfacebook"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/darkgray"

android:orientation="vertical" >

<TextView
    android:id="@+id/tv_secs2"
    android:layout_width="100dp"
    android:layout_height="wrap_content"
    />

</RelativeLayout>

区别如下:

在此处输入图像描述

4

1 回答 1

0

这可能是因为您的 4.4 手机具有不同的 DPI。请再次确认。

于 2014-02-27T08:15:30.140 回答