Note that there are some explanatory texts on larger screens.

plurals
  1. POjava.lang.IllegalStateException: ScrollView can host only one direct child
    primarykey
    data
    text
    <p>I'm simply trying to add the ability to scroll through this layout by adding a scrollview however every time I attempt to load the layout I'm getting an error stating "java.lang.IllegalStateException: ScrollView can host only one direct child" and I'm unsure why. </p> <p>Any suggestions are much appreciated.</p> <h2>SOURCE:</h2> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" &gt; &lt;RelativeLayout&gt; &lt;View android:layout_width="1dp" android:layout_height="5dp" &gt; &lt;/View&gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" &gt; &lt;com.google.android.youtube.player.YouTubePlayerView android:id="@+id/youtubeplayerview" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;View android:layout_width="1dp" android:layout_height="5dp" &gt; &lt;/View&gt; &lt;TextView android:id="@+id/textView1a" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Isaac Daniel at CNN Anderson Cooper" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;TextView android:id="@+id/textView2a" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="by idconex" android:textAppearance="?android:attr/textAppearanceSmall" /&gt; &lt;TextView android:id="@+id/textView3a" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="675,000,000 views" android:textAppearance="?android:attr/textAppearanceSmall" /&gt; &lt;com.google.android.youtube.player.YouTubePlayerView android:id="@+id/youtubeplayerview2" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView android:id="@+id/textView1b" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Rage Against The Machine - Bulls on Parade" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;TextView android:id="@+id/textView2b" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="by RATMVEVO" android:textAppearance="?android:attr/textAppearanceSmall" /&gt; &lt;TextView android:id="@+id/textView3b" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="1,195,601 views" android:textAppearance="?android:attr/textAppearanceSmall" /&gt; &lt;/ScrollView&gt; &lt;/RelativeLayout&gt; &lt;/LinearLayout&gt; </code></pre> <h2>EDIT (In response to CodeMagic's answer)</h2> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" &gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" &gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;com.google.android.youtube.player.YouTubePlayerView android:id="@+id/youtubeplayerview" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;View android:layout_width="1dp" android:layout_height="5dp" &gt; &lt;/View&gt; &lt;TextView android:id="@+id/textView1a" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Isaac Daniel at CNN Anderson Cooper" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;TextView android:id="@+id/textView2a" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="by idconex" android:textAppearance="?android:attr/textAppearanceSmall" /&gt; &lt;TextView android:id="@+id/textView3a" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="675,000,000 views" android:textAppearance="?android:attr/textAppearanceSmall" /&gt; &lt;com.google.android.youtube.player.YouTubePlayerView android:id="@+id/youtubeplayerview2" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView android:id="@+id/textView1b" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Rage Against The Machine - Bulls on Parade" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;TextView android:id="@+id/textView2b" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="by RATMVEVO" android:textAppearance="?android:attr/textAppearanceSmall" /&gt; &lt;TextView android:id="@+id/textView3b" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="1,195,601 views" android:textAppearance="?android:attr/textAppearanceSmall" /&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