Note that there are some explanatory texts on larger screens.

plurals
  1. PODrawerlayout children views overlapping
    text
    copied!<p>I've been trying to make a <code>DrawerLayout</code> that has a <code>ViewPager</code> and a <code>LinearLayout</code> attached to the bottom of the <code>DrawerLayout</code>. The problem is that the <code>ViewPager</code> and <code>LinearLayout</code> are overlapping at the top of the view, and all my efforts to move the <code>LinearLayout</code> down have failed so far.</p> <p>The XML Layout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&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;android.support.v4.view.ViewPager android:id="@+id/viewpager" android:layout_width="match_parent" android:layout_height="0dp" &gt; &lt;android.support.v4.view.PagerTabStrip android:id="@+id/tabstrip" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;/android.support.v4.view.ViewPager&gt; &lt;LinearLayout android:id="@+id/linear_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_below="@id/base_activity_viewpager" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/textview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textAppearance="@android:style/TextAppearance.Medium" android:textIsSelectable="false" /&gt; &lt;/LinearLayout&gt; &lt;!-- Naviagtion drawer --&gt; &lt;ListView android:id="@+id/drawer" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" android:background="#111" android:choiceMode="singleChoice" android:divider="@android:color/transparent" android:dividerHeight="0dp" /&gt; &lt;/android.support.v4.widget.DrawerLayout&gt; </code></pre> <p>I've tried adding several things to linear_layout:</p> <ol> <li><code>android:layout_gravity="bottom"</code> (causes an IllegalStateException)</li> <li><code>android:layout_below="@id/viewpager"</code></li> <li><code>android:layout_alignparentbottom="true"</code></li> </ol> <p>But all of these values seem to be ignored, even changing <code>android:layout_width</code> of the <code>LinearLayout</code> is ignored. I think i'm overlooking something obvious but if anyone has suggestions on how to do this it would be greatly appreciated.</p>
 

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