I am trying to add a Navigation Drawer inside my app. Here's the code:
<DrawerLayout 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"
tools:context="com.example.abcxyz.properprojectdb.MyDrawerActivity">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"></FrameLayout>
<ListView
android:layout_width="240dp"
android:layout_height="match_parent"
android:id="@+id/listView"
android:entries="@array/planets"></ListView>
</DrawerLayout>
I am unable to add the attribute android:layout_gravity for ListView. I don't know why it is not available for use (intellisense works perfectly, but it won't show layout_gravity)
My app crashes when I run it, but if I replace DrawerLayout with LinearLayout, the app doesn't crash.
I am guessing that it is because I have not added the attribute android:layout_gravity for ListView.
Here's a snapshot to show that layout_gravity doe not appear in intellisense either