Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to remove default spacing between textviews android
    primarykey
    data
    text
    <p>Answer ::: Used <code>android:layout_marginTop="-5dp"</code> for both TextView 3 and 4.</p> <p>I have two linear layouts(horizontal) with two textviews each. </p> <p>TextView1 TextView2</p> <p>TextView3 TextView4</p> <p>I get a default spacing between these LinearLayouts, which i don't want. I want the textviews 3 and 4 appear right below the 1 and 2. How do I get it?</p> <p>The outer layout is a relative layout</p> <p>XML</p> <pre><code>&lt;LinearLayout android:id="@+id/ll1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_below="@id/img" android:paddingLeft="5dp" android:paddingRight="5dp" &gt; &lt;TextView android:id="@+id/imp" android:layout_width="0dip" android:layout_weight="0.80" android:layout_height="wrap_content" android:text="@string/xyzs" android:textColor="#808080" android:textIsSelectable="false" android:textSize="10sp" android:gravity="left" /&gt; &lt;TextView android:id="@+id/impr" android:layout_width="0dip" android:layout_weight="0.20" android:layout_height="wrap_content" android:text="@string/xyz2" android:textColor="#545454" android:textIsSelectable="false" android:textSize="10sp" android:textStyle="bold" android:gravity="right" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_below="@id/ll1" android:paddingLeft="5dp" android:paddingRight="5dp" &gt; &lt;TextView android:id="@+id/v" android:layout_width="0dip" android:layout_weight="0.80" android:layout_height="wrap_content" android:text="@string/xyz3" android:textColor="#747474" android:textIsSelectable="false" android:textSize="10sp" android:gravity="left" /&gt; &lt;TextView android:id="@+id/vo" android:layout_width="0dip" android:layout_weight="0.20" android:layout_height="wrap_content" android:text="@string/xyz4" android:textColor="#545454" android:textIsSelectable="false" android:textSize="10sp" android:textStyle="bold" android:gravity="right" /&gt; &lt;/LinearLayout&gt; </code></pre>
    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.
    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