I want to rewrite an existing view to look like this:
This is my current xml and screenshot:
I'm using this 9 patch:
<!--
========================================================================
* Information layout - contains the explanation text on the background
========================================================================
-->
<RelativeLayout
android:id="@+id/layout_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/widget_bg_info1"
android:orientation="vertical" >
<TextView
android:id="@+id/text_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/widget_nodata_title"
android:textColor="@color/solid_white"
android:textSize="22sp"
android:layout_above="@+id/widget_error"
android:paddingBottom="20dp"/>
<ImageView
android:id="@+id/widget_error"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="@drawable/widget_error"
android:layout_centerHorizontal="true" />
<LinearLayout
android:id="@+id/layout_text_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/text_info1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="87dp"
android:gravity="left"
android:paddingLeft="18dp"
android:paddingRight="15dp"
android:text="@string/widget_nodata_info1"
android:textColor="@color/solid_black"
android:textSize="15sp" />
<TextView
android:id="@+id/text_info2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="10dp"
android:gravity="left"
android:paddingLeft="18dp"
android:paddingRight="15dp"
android:text="@string/widget_nodata_info2"
android:textColor="@color/solid_black"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="@+id/text_info3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="10dp"
android:gravity="left"
android:paddingLeft="18dp"
android:paddingRight="15dp"
android:text="@string/widget_nodata_info3"
android:textColor="@color/solid_black"
android:textSize="15sp" />
</LinearLayout>
<!--
========================================================================
* Buttons layout - contains all the texts
========================================================================
-->
<LinearLayout
android:id="@+id/layout_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:layout_below="@+id/layout_text_info"
android:layout_centerHorizontal="true"
android:gravity="center"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="130dp"
android:layout_height="wrap_content"
android:background="@drawable/button_blue"
android:clickable="true"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp" >
<TextView
android:id="@+id/text_btn_enter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/widget_no_data_accept"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:layout_width="130dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:background="@drawable/button_blue"
android:clickable="true"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp" >
<TextView
android:id="@+id/text_btn_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/widget_no_data_close"
android:textColor="#000000" />
</LinearLayout>
</LinearLayout>
</RelativeLayout> <!-- -->
How pose the title on top the gray top area?
How to center the two bottom buttons?