안녕하세요 저는 두 개의 버튼, 라디오 버튼 및 그래프보기가 포함 된 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 신호를 보여주는 그래프 뷰가있는 상대적 레이아웃입니다. 나는이 그래프를 반으로 나누고 다른 반쪽에서 호흡의 신호를 보여주고 싶습니다. 같은 장소에 있어야 할 바닥에 3 개의 버튼이 있습니다. –