도움이 필요합니다.이 코드가 올바르게 실행되지 않는 이유는 모르겠다. 첫 번째 텍스트보기와 edittext는 50 %의 공백이 있어야하고 두 번째 textview와 edittext는 빈 레이아웃 만 표시하는 반면 50 %는 다른 텍스트를 원한다. 제발 도와주세요너비를 백분율로 정의하십시오.
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:weightSum="1.0"
>
<TextView
android:layout_height="wrap_content"
android:layout_weight="0.10"
android:layout_width="0dip"
android:id="@+id/lytner_card_question_text"
android:layout_alignParentRight="true"
android:gravity="center"
android:textSize="20dp"
/>
<ScrollView android:id="@+id/myparentScrollview"
android:layout_height="100dp"
android:layout_weight="0.40"
android:layout_width="0dip"
android:layout_toLeftOf="@+id/lytner_card_question_text"
>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/lytner_card_question_etext"
android:minHeight="100dp"
/>
</ScrollView>
<TextView
android:layout_height="wrap_content"
android:layout_weight="0.10"
android:layout_width="0dip"
android:id="@+id/lytner_card_answer_text"
android:layout_toLeftOf="@+id/myparentScrollview"
android:gravity="center"
android:textSize="20dp"
/>
<ScrollView android:id="@+id/myparentScrollview1"
android:layout_height="100dp"
android:layout_weight="0.40"
android:layout_width="0dip"
android:layout_toLeftOf="@+id/lytner_card_answer_text"
>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/lytner_card_answer_etext"
android:minHeight="100dp"
/>
</ScrollView>
</RelativeLayout>
사용 채우기 부모를 한 후 모든 뷰에 – Klaasvaak
사용 체중 attribs 속성 weigth 사용합니다. –