Note that there are some explanatory texts on larger screens.

plurals
  1. POPositioning Views in Android
    primarykey
    data
    text
    <p>I want to create a fill in the blank type of question. Where the user drags and drops the answer in the empty space.</p> <p>My Name is <strong><em>_</em>__<em>_</em>_</strong>. Or &lt; Some long text > <strong><em>_</em>__<em>_</em>__<em>_</em></strong> &lt; Some other text >. </p> <p>What I did :</p> <p>I used Horizontal linear layout but the problem is some of the views disappear specially when the text is too long or they will not be positioned exactly after the text view. Any idea how i can concatenate those views . TextView + Empty Layout + TextView. excatly the way i showed above . </p> <p>Thanks</p> <p>Here is the Code .....</p> <h3>Layout XML</h3> <pre><code>android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;LinearLayout android:id="@+id/thequestionLayout" android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;TextView android:id="@+id/start_tv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Some text" /&gt; &lt;LinearLayout android:id="@+id/blank_space" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/shape" &gt; &lt;/LinearLayout&gt; &lt;TextView android:id="@+id/end_tv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="end text" /&gt; &lt;/LinearLayout&gt; &lt;!-- Here are the choices --&gt; &lt;LinearLayout android:id="@+id/theChoicesLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" &gt; &lt;TextView android:id="@+id/choice1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /&gt; &lt;TextView android:id="@+id/choice2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /&gt; &lt;TextView android:id="@+id/choice3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /&gt; &lt;/LinearLayout&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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