Sunday, 25 August 2013

Dividing a Relative Layout into two halves

Dividing a Relative Layout into two halves

Hi I have created a Relative layout 2 buttons , 1 radio button and one
graph view . I want to display two different data in graph now . How to
split the Relative Layout into two halves ?
This is my present XML code :
<**RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="@+id/BtnStart"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="5dip"
android:text="SlaveEnable" />
<Button
android:id="@+id/BtnStop"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/BtnStart"
android:layout_alignParentBottom="true"
android:layout_marginTop="5dip"
android:text="SlaveDisable" />
<RadioButton
android:id="@+id/BtnSaveFile"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/BtnStop"
android:layout_alignParentBottom="true"
android:text="SaveFile" />
<helog.diwesh.NugaBest.GraphView
android:id="@+id/gview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/BtnStart"
android:layout_alignParentRight="true" />
</RelativeLayout>**

No comments:

Post a Comment