단락을 만들려는 레이아웃 파일입니다. 즉, 다음 문장은 이전 문장이 끝나는 지점부터 시작해야합니다. 그러나 이것은 일어나지 않으며 다음 문장이 다음 줄에 올 것입니다. 사실 나는 각 문장이 데이터베이스와 연결되어 있고 사용자가 선택해야하기 때문에 xml 접근 방식을 사용하고 있으므로 \n
을 사용하여 선택을 할 수 없습니다.xml 레이아웃을 사용하여 여러 textviews를 사용하여 단락 만들기
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<ScrollView
android:fillViewport="true"
android:id="@+id/q_area"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/question_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:padding="10dp"
android:text="Q1 : Select the right sentence out of these ?" />
<LinearLayout
android:orientation="vertical"
android:padding="10dp"
android:layout_below="@id/question_text"
android:layout_marginTop="25dp"
android:id="@+id/comprehension"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/sentence1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reading comprehension is defined as the level of understanding of a text/message." />
<TextView
android:id="@+id/sentence2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This understanding comes from the interaction between the words that are written and how they trigger knowledge outside ." />
<TextView
android:id="@+id/sentence3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Proficient reading depends on the ability to recognize words quickly and effortlessly." />
<TextView
android:id="@+id/sentence4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Many educators in the USA believe that students need to learn to analyze text." />
<TextView
android:id="@+id/sentence5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="But other US educators consider this reading approach to be completely backward." />
</LinearLayout>
<TextView
android:id="@+id/explanation_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/comprehension"
android:layout_marginTop="25dp"
android:padding="10dp"
android:text="Explanation: Sentence you have selected is right?" />
<View
android:visibility="invisible"
android:id="@+id/user_optionset4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/explanation_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
/>
</RelativeLayout>
</ScrollView>
<LinearLayout
android:background="@android:color/black"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:gravity="center"
android:padding="0dp"
android:singleLine="true"
android:text="P"
android:textColor="@android:color/black" />
<Button
android:id="@+id/Take"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1.4"
android:gravity="center"
android:padding="0dp"
android:singleLine="true"
android:text="Done"
android:textColor="@android:color/white" />
<Button
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:gravity="center"
android:padding="0dp"
android:singleLine="true"
android:text="N"
android:textColor="@android:color/black" />
</LinearLayout>
</RelativeLayout>
이 전류 출력 :
예상 출력 다음 문장은 화상에 나타낸 바와 같이, 노란색 화살표의 위치에서 시작해야
시도해보십시오
태그 ?? – Zax