views:

99

answers:

1

I have three images in my drawable folder, and an XML Image Button code:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;\
<item android:state_pressed="true"
android:drawable="@drawable/happycarrot" /> <!-- pressed -->
<item android:state_focused="true" 
android:drawable="@drawable/largerunicornbutton2" /> <!-- focused -->
<item android:drawable="@drawable/largerunicornbutton" /> <!-- default -->
</selector>

In my layout folder, I have my main XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:src="@drawable/button"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
></ImageView>
<TextView  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/hello"
/>
</LinearLayout>

When I run it in the emualtor I only get the first image. It doesn't do anything else. What do I do?

A: 

Hahahaha nevermind, I used a Linearlayout instead of a relative one. xD I'm such a dork!

Mia