Note that there are some explanatory texts on larger screens.

plurals
  1. POTextView cutting off lines because of parent's LinearLayout wrap_content in android
    primarykey
    data
    text
    <p>What I want to do is make a centered box containing some text blurbs and a button to proceed. I was able to get the box centered and not taking up the entire screen by using wrap_content, but the blurbs are several lines long, and the textviews containing them are not showing all the text. Here is what I have:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:background="@color/background" android:orientation="vertical" &gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center" android:background="@color/content" android:padding="10dp" &gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:text="@string/title" android:textColor="@color/black" /&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/teacher_head" android:textColor="@color/black" /&gt; &lt;TextView style="@style/home_blurb" android:text="@string/teacher_blurb" /&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/student_head" android:textColor="@color/black" /&gt; &lt;TextView android:text="@string/student_blurb" style="@style/home_blurb" /&gt; &lt;Button android:layout_width="wrap_content" android:layout_height="0dip" android:layout_gravity="center" android:layout_weight="0.1" android:gravity="center" android:paddingTop="5dp" android:text="@string/go_to_app" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>where home_blurb is</p> <pre><code>&lt;style name="home_blurb" parent="android:TextAppearance"&gt; &lt;item name="android:paddingBottom"&gt;5dp&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/black&lt;/item&gt; &lt;item name="android:layout_width"&gt;fill_parent&lt;/item&gt; &lt;item name="android:layout_height"&gt;fill_parent&lt;/item&gt; &lt;item name="android:layout_weight"&gt;1&lt;/item&gt; &lt;item name="android:textSize"&gt;12dp&lt;/item&gt; &lt;/style&gt; </code></pre> <p>The inner LinearLayout sets itself to the width of the button, which I'm okay with, but is there any way to make it wide enough to contain all the text without setting particular pixel measurements (like screen percentage in html/css)? </p>
    singulars
    1. This table or related slice is empty.
    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