Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate a paragraph using multiple textviews using xml layout
    text
    copied!<p>This is my layout file by which I want to create a paragraph. i.e. The next sentence should start from the point where the previous ends up. But this ain't happen and the next sentence is coming in the next line. Actually I am going by an xml approach because each sentence is associated with database and has to be selected by user , so there is no choice by doing it using <code>\n</code>.</p> <pre><code>&lt;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" &gt; &lt;ScrollView android:fillViewport="true" android:id="@+id/q_area" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;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 ?" /&gt; &lt;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" &gt; &lt;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." /&gt; &lt;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 ." /&gt; &lt;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." /&gt; &lt;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." /&gt; &lt;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." /&gt; &lt;/LinearLayout&gt; &lt;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?" /&gt; &lt;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" /&gt; &lt;/RelativeLayout&gt; &lt;/ScrollView&gt; &lt;LinearLayout android:background="@android:color/black" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" &gt; &lt;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" /&gt; &lt;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" /&gt; &lt;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" /&gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>This is the current output :</p> <p><img src="https://i.stack.imgur.com/PapQ5.png" alt="enter image description here"></p> <p>Expected output , the next sentence should start at the position of yellow arrows , as shown in the image :</p> <p><img src="https://i.stack.imgur.com/duQPf.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload