I have two questions.
1.) Right now I have a popup that has an X displaying inside on the top right, but I can't get it to appear overlaying the top right corner of the popup. What can I do to achieve the desired "X" button?
currently: http://i.imgur.com/zKN0cWv.png
desired: http://i.imgur.com/Lj5gHhY.png
2.) My "Top Button" and "Bottom Button" fill the entire width of the screen even though I have it to wrap content. Is there a way to make the buttons be narrower? (Actually, I would like to have them both be narrower, but still the same width even if one button's text is longer than the other). Does it have something to do with the way I laid out the XML? Ideally, I want to have a background image on the popup, but when I put in the image, the image goes inside the 3 textviews too, which leads me to think that I don't have a very good XML file. Does anyone know how to solve this problem too? Thanks!
layout/popup.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/popup_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:text="@string/popup_message"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="#464646" >
</TextView>
<TextView
android:id="@+id/popup_text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/popup_header"
android:gravity="center_vertical|center_horizontal"
android:text="@string/popup_message2"
android:textSize="20sp"
android:textColor="#464646" >
</TextView>
<TextView
android:id="@+id/popup_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/popup_text1"
android:text="@string/popup_message3"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="#464646" >
</TextView>
<Button
android:id="@+id/top_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/popup_text2"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="12dp"
android:background="#f000ff"
android:text="@string/top_button"
android:textColor="#ffffff"
android:textSize="20sp" >
</Button>
<Button
android:id="@+id/bottom_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/top_button"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:background="#f000ff"
android:text="@string/bottom_button"
android:textColor="#ffffff"
android:textSize="20sp" >
</Button>
<Button
android:layout_alignParentRight="true" android:text="@string/dismiss"
android:textColor="#FFF" android:background="@drawable/round_button_background"
android:gravity="center_vertical|center_horizontal"
android:layout_margin="5dp" android:layout_height="25dp"
android:layout_width="25dp" android:textSize="12sp" android:textStyle="bold"
android:onClick="cancelActivity" >
</Button>
</RelativeLayout>
drawable/round_button_background.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#9F2200" />
<stroke android:width="3dp" android:color="#FFF" />
</shape>
values/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.CustomDialog" parent="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
<item name="android:windowIsFloating">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:padding">4dp</item>
<item name="android:background">#f8adfc</item>
</style>
</resources>