Android: ListView being overlapped by views below it



I'm trying to implement a SlidingMenu that has a "User Profile" at the top and a list of selectable modules below that.


Here is a screenshot of what I have currently: http://ift.tt/1B6MATw


This all works as planned but if you notice there is a white gap near the bottom, I've tried everything to get this white bar to get away, I've given the layout beneath the same background color, I've increased the ListView's height to "fill_parent" ANYTHING I change regarding this messes up my entire layout.


Here is a screenshot depicting what goes wrong: http://ift.tt/1AKbb2D


The view itself doesn't look so bad but the ListView is "gone" or so I originally thought but it still functions normally...


-


I gave the RelevantLayout a slightly transparent background and I can see that the ListView is being overlapped by this Layout.


Please help me figure out why the z-order is changing or to help me figure out the cause of this it's way more frustrating than it needs to be.


sliding_menu.xml



<FrameLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<RelativeLayout
android:id="@+id/left_drawer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#FF0000FF">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#ff0">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="168dp"
android:background="#f00">

<LinearLayout
android:id="@+id/rlProfile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="horizontal"
android:padding="8dp" >

<com.towbook.mobile.classes.RoundedImageView
android:id="@+id/avatar"
android:layout_width="55dp"
android:layout_height="55dp"
android:src="@drawable/square1" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="55dp"
android:layout_marginLeft="15dp"
android:orientation="vertical" >


<TextView
style="@style/fontSizeTitle"
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:shadowColor="@color/white"
android:shadowDx="0"
android:shadowDy="-1"
android:shadowRadius="0.5"
android:singleLine="true"
android:text="Shane Denomme"
android:textColor="@color/white"
android:textStyle="bold" />

<TextView
style="@style/fontSizeContent"
android:id="@+id/desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginTop="4dp"
android:ellipsize="end"
android:shadowColor="@color/white"
android:shadowDx="0"
android:shadowDy="-1"
android:shadowRadius="0.5"
android:singleLine="true"
android:text="sdenomme15@gmail.com"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/sliding_menu_bg"/>

<!-- All your menu options goes here -->

</LinearLayout>
</RelativeLayout>
</FrameLayout>

No comments:

Post a Comment