Listview Drops To The Bottom
I am using the following layout. Basically, it has a custom toolbar, a Navigation Drawer, a menu, a ListView (listView1), and adlay.
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/black"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar">
<LinearLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_weight="1"
android:cacheColorHint="#00000000"
android:divider="@android:color/transparent"
android:dividerHeight="3dp">
</ListView>
<LinearLayout
android:id="@+id/adlay"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Your Adlay Layout"/>
</LinearLayout>
</LinearLayout>
<ListView
android:id="@+id/drawer_list"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar"
android:layout_gravity="start"
android:background="#fff"
android:choiceMode="singleChoice"
android:divider="#eee"
android:dividerHeight="1dp">
</ListView>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>
Post a Comment for "Listview Drops To The Bottom"