0

Ich arbeite an einer App "Namaz Pro" mit Xamarin.Android!UI beim Rendern korrigieren, erscheint nicht für Gerät

Mein Problem ist, dass meine App zeigt mir meine erwartete Benutzeroberfläche korrekt beim Rendern auf Gerät: Nexus 4 in Visual Studio.

Ich habe sogar versucht Android Studio und es macht die UI wie ich es will:

Render

Mein Emulator A jedoch Nexus 4 auf KitKat nicht in der Lage ist das gleiche anzuzeigen:

Emulator Display

UPDATE: Meine Zeichnungsordner

Drawable Folder

My-Code für Entwurf:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_margin="2dp" 
    android:background="#efeff4" 
    android:orientation="vertical" 
    android:weightSum="100"> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="10" 
     android:background="#0c3b07" 
     android:orientation="vertical"> 

     <TextView 
      android:id="@+id/txtDateToday" 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:layout_weight="10" 
      android:gravity="center" 
      android:text="Thu 05-May-2016" 
      android:textColor="#FFFFFF" 
      android:textSize="20sp" /> 

     <TextView 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:layout_weight="10" 
      android:gravity="center" 
      android:orientation="vertical" 
      android:text="28 Rajab 1437" 
      android:textColor="#FFFFFF" 
      android:textSize="20sp" /> 
    </LinearLayout> 

    <RelativeLayout 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="30"> 

     <ImageView 
      android:id="@+id/demoImageView" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:scaleType="fitXY" 
      android:src="@drawable/fajrImage" /> 

     <TextView 
      android:id="@+id/txtPrayerNow" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentTop="true" 
      android:layout_centerHorizontal="true" 
      android:layout_marginTop="12dp" 
      android:text="Fajr" 
      android:textColor="#FFFFFF" 
      android:textSize="20sp" /> 

     <TextView 
      android:id="@+id/txtPrayerTime" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_centerHorizontal="true" 
      android:layout_centerVertical="true" 
      android:text="05:30 PM" 
      android:textColor="#FFFFFF" 
      android:textSize="24sp" /> 

     <TextView 
      android:id="@+id/txtLocation" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true" 
      android:layout_centerHorizontal="true" 
      android:paddingBottom="6dp" 
      android:text="Kolkata,India" 
      android:textColor="#FFFFFF" 
      android:textSize="20sp" /> 
    </RelativeLayout> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="60" 
     android:background="@drawable/background" 
     android:orientation="vertical" /> 
</LinearLayout> 
+0

Es scheint, dass die Bilder nicht in den Emulator kopiert werden, wenn Sie den weißen Text ändern, der "Fajr" enthält, ist das sichtbar? Und welche Konfiguration haben die Bilder? – Sanne

+0

@Sanne No nichts unter den ersten beiden Zeilen sind sichtbar –

+0

@RahulJha kann versuchen, Ihr Bild zu ändern und validieren, dass ein anderes Bild kleiner Größe funktioniert oder nicht? Ich denke, Größe könnte ein Problem verursachen. – RIYAZ

Antwort

0

Mein ziehbar Ordner hatte Bindestriche und Striche in Dateinamen. Irgendwie wurde mein Projekt auch danach noch aufgebaut. Folgen Namenskonventionen für Xamarin.Android

Verwandte Themen