Ich versuche, ein Bild von 20KB in einer Bildansicht zu setzen. Aber ich bekomme das Bild nicht auf dem Bildschirm. Ich habe das Bild in Resources/@ drawable eingefügt. Das Bild wird jedoch nicht auf dem Layoutbildschirm (.axml) angezeigt. Mein .axml Code ist unten:Probleme bei der Einstellung Bild in Bildansicht in Xamarin.android
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="25px"
android:minHeight="25px">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<TextView
android:text="Last Check-in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView1"
android:paddingLeft="20dp"
android:paddingRight="30dp"
android:paddingTop="10dp"
android:paddingBottom="5dp" />
<TextView
android:text="Date"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/textView2"
android:paddingLeft="50dp"
android:paddingRight="50dp"
android:paddingTop="10dp"
android:paddingBottom="5dp" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:src="@android:drawable/ic_menu_gallery"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/imageView2" />
<TextView
android:text="Productivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView1"
android:paddingLeft="20dp"
android:paddingRight="30dp"
android:paddingTop="10dp"
android:paddingBottom="5dp" />
<ImageView
android:src="@drawable/1happy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/fithappy" />
</LinearLayout>
<ImageView
android:src="@android:drawable/ic_menu_gallery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView1" />
</LinearLayout>
@ drawablw/1happy ist das Bild
enthalten
Haben Sie den Ordner 'nennen @ drawable'? – Cheesebaron