webview in layout with 4 textviews in top



I do not have much experience with screen layouts xml. I would like to show my screen like this: http://ift.tt/1uOGs3k


PS: I would add textvies label3 and Label4 (in red). they are in the figure, but are not in the xml, because I could not aligning them.


Would help to fit these two textviews in my layout below:



<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="fill_parent"
android:theme="@android:style/Theme.Dialog"
android:layout_height="fill_parent" >

<WebView
android:id="@+id/id_web_view_browser"
android:layout_above="@+id/id_web_view_bar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" />

<RelativeLayout
android:id="@+id/id_web_view_bar"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:background="#ffffff"
android:orientation="vertical" >
<Button
android:id="@+id/btnCancelar"
android:background="@drawable/btn_red"
android:layout_width="fill_parent"
android:layout_centerHorizontal="true"
android:layout_height="wrap_content"
android:text=" Cancelar Corrida "
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:textSize="20sp" />

</RelativeLayout>

<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="top">
<TextView
android:id="@+id/txtLabel1"
android:layout_alignParentLeft="true"
android:layout_height="wrap_content"
android:background="#ffffff"
android:maxLines="1"
android:layout_width="wrap_content"
android:text="Label1: Sample1">
</TextView>
<TextView
android:id="@+id/txtLabel2"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="#ffffff"
android:text="Label2: Sample2">
</TextView>

</RelativeLayout>

</RelativeLayout>

No comments:

Post a Comment