嗨我已经创建了一个包含2个按钮,一个单选按钮和一个图形视图的RelativeLayout。将RelativeLayout分为两部分
我想现在在图中显示两个不同的数据。
如何将RelativeLayout分成两部分?
这是我现在的XML代码:
<?xml version="1.0" encoding="utf-8"?>
<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_alignParentBottom="true"
android:layout_marginTop="5dip"
android:layout_toRightOf="@id/BtnStart"
android:text="SlaveDisable" />
<RadioButton
android:id="@+id/BtnSaveFile"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@id/BtnStop"
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>
我没有在这里得到问题吗?你到底想做什么?你是否想要在屏幕上添加两个图表,都占用相同的空间?或者您可以上传显示所需布局的样本图纸。 – Sagar
是的,我现在的布局是一个相对布局,图形视图显示波形的ECG信号。我现在想把这张图分成两半,另一半显示呼吸信号。底部有三个按钮,应该放在同一个地方 –