Android XML Issue - images not displaying in AVD

knocknock

New Member
I'm fairly new to android but I've managed to figure out how all the layout stuff works with XML. That's all fine.In the Graphical Layout tab in Eclipse I have a few buttons and a logo which is a .gif image. I have place the .gif image into my XML file as an ImageView within a LinearLayout and it shows up on the Graphical Layout.But when I run it in the Android Virtual Device (AVD) everything shows up but the image. Anyone know why this is happening? See XML code below...\[code\]<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="fill_parent"android:layout_height="fill_parent"android:background="@drawable/natlib"android:orientation="vertical" ><LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:id="@+id/textView1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="-8dp" android:padding="@dimen/padding_medium" android:text="@string/welsh_libs" android:textColor="#79438F" android:textSize="22dip" android:textStyle="bold" tools:context=".MainActivity" /></LinearLayout><LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <Button android:id="@+id/button1" android:layout_width="137dp" android:layout_height="wrap_content" android:layout_marginBottom="25dp" android:background="#A4C81C" android:text="@string/ask_lib" /> <Button android:id="@+id/button2" android:layout_width="137dp" android:layout_height="wrap_content" android:layout_marginBottom="25dp" android:background="#FF0066" android:text="@string/find_book" /> <Button android:id="@+id/button3" android:layout_width="137dp" android:layout_height="wrap_content" android:layout_marginBottom="25dp" android:background="#3F83F1" android:text="@string/find_lib" /> <Button android:id="@+id/button4" android:layout_width="137dp" android:layout_height="wrap_content" android:layout_marginBottom="25dp" android:background="#FE0002" android:text="@string/register" /> <Button android:id="@+id/button5" android:layout_width="137dp" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:background="#FBFC3F" android:text="@string/login" /> <ImageView android:id="@+id/image1" android:layout_width="wrap_content" android:layout_height="0dip" android:layout_marginLeft="220dp" android:layout_marginTop="20dp" android:layout_weight="0.37" android:contentDescription="@string/desc" android:src="http://stackoverflow.com/questions/11545366/@drawable/wag_logo" android:visibility="visible" /></LinearLayout>\[/code\]
 
Back
Top