이 격자보기가 화면의 오른쪽에 대해 수평이되도록 오른쪽 정렬하고 싶습니다. 그러나 오른쪽에 설정 한 텍스트보기를 항상 따라 다니는 것처럼 보입니다. 뿐만 아니라 모든 텍스트 뷰가 서로 위에 표시됩니다.GridView가 Relativelayout 맞춤을 따르지 않습니다.
<?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">
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/time_left"
android:textSize="30sp"
android:layout_alignParentLeft="true"
android:id="@+id/time_left_label"/>
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/time_left"
android:layout_alignParentLeft="true"
android:layout_below="@id/time_left_label"/>
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/progress"
android:textSize="30sp"
android:layout_alignParentLeft="true"
android:layout_below="@id/time_left"
android:id="@+id/progress_label" />
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/progress"
android:layout_alignParentLeft="true"
android:layout_below="@id/progress_label"/>
<GridView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/main_grid"
android:numColumns="2"
android:layout_alignParentRight="true"
android:layout_toRightOf="@id/time_left_label"
android:stretchMode="none" />
</RelativeLayout>
다음은 제가 페인트로 빨리 그려야 할 그림입니다. http://imgur.com/x7Ypr
1. 텍스트 뷰가 모두 왼쪽으로 정렬되어 있기 때문에 텍스트 뷰가 서로 위에 있습니다. android : layout_toRightOf = ""를 사용하면 겹치지 않을 것입니다. 페인트를 칠하고 원하는 레이아웃의 그림을 그릴 수 있으면 더 쉽게 시간을 가질 수 있습니다. – Renard