Domanda

Lo stesso XML sembra diverso in Android 4.3 vs 4.4.Il problema è che KitKat (4.4) non sta raccogliendo questa linea: "android:background="@drawable/darkgray" (DarkGray.jpg è un IMG)

Perché Kitkat si comporta in modo diverso?

<?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>
.

La differenza è come sotto:

Inserire l'immagine Descrizione qui

È stato utile?

Soluzione

Potrebbe perché il tuo telefono 4.4 ha DPI diversi.Si prega di riconfermalo.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top