Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Drawer layout and Scroll View in The Same Activity
    primarykey
    data
    text
    <p>I am trying to display a large block of text using TextView that cannot fit onto a screen. I have tried surrounding this view with a ScrollView and found when used in isolation it works. When I try to add a DrawerLayout, the scroll able action no longer works (but the DrawerLayout does). I am guessing that it's because of the DrawerLayouts requirement to use FrameLayout. Below is the xml code that I am using. Most of the code follows the google tutorial for drawerlayout at <a href="http://developer.android.com/training/implementing-navigation/nav-drawer.html" rel="nofollow">http://developer.android.com/training/implementing-navigation/nav-drawer.html</a></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &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" android:background="@color/black" &gt; &lt;TextView android:id="@+id/city_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:textStyle="bold" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="@color/white" /&gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true" android:layout_below="@+id/city_title"&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/city_details" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1.0" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/white"/&gt; &lt;/LinearLayout&gt; &lt;/ScrollView&gt; &lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="match_parent" /&gt; &lt;ListView android:id="@+id/left_drawer" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" android:choiceMode="singleChoice" android:divider="@android:color/transparent" android:dividerHeight="0dp" android:background="#111"/&gt; &lt;/android.support.v4.widget.DrawerLayout&gt; </code></pre> <p>Any tips or advice would be greatly appreciated.</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.
 

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