android:layout_...
은 ImageView
과 작동합니까? 사진에서 모든 10 개의 행이 서로 위에 있다는 것을 볼 수 있습니다. 즉, q2Image
은 행을 삭제하고 다음 행에 별표를 표시하는 코드 android:layout_below="@/q1Image"
을 허용하지 않습니다.android : ImageView가 작동하지 않는 layout_below
나는 뭔가를 놓치고 있습니까? 아니면 불가능한 것을하려고합니까? 그런
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="65"
android:fillViewport="true" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/q1Image"
android:layout_width="10dp"
android:layout_height="10dp" />
<TextView
android:id="@+id/q1Question"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/q1Image" />
<TextView
android:id="@+id/q1Answer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/q1Question" />
<TextView
android:id="@+id/q1Verse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/q1Answer" />
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#C2BEBF" />
<ImageView
android:id="@+id/q2Image"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_below="@id/q1Image" />
<TextView
android:id="@+id/q2Question"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/q2Image" />
<TextView
android:id="@+id/q2Answer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/q2Question" />
<TextView
android:id="@+id/q2Verse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/q2Answer" />
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#C2BEBF" />
//Above code is first 2 rows. There are 10 rows total but I removed the code for rows 3-10 for this post.
자세한 내용은이 질문을 확인하십시오. http://stackoverflow.com/questions/5025910/difference-between-and-id-in-android –
두 가지 방법으로 읽고 결과를 모두 얻었습니다. . – Matt
이클립스에서 그래픽 레이아웃으로 이동하여 대신 마우스를 사용하여 코드를 작성하십시오. – Pragnani