I want to style the NavigationDrawer but I don't understand, which code I should change. I want to set following style (background/foreground):
- Standard
- Active-Item
- Pressed/Focused-Item
and I also want to add an Icon before the List-Items!
Here is the activity where the content is loaded in and drawer is shown:
activity_main_window.xml:
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="bernd.slider">
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The drawer is given a fixed width in dp and extends the full height of
the container. -->
<fragment android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:name="bernd.slider.NavigationDrawerFragment"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>
And here the fragment_navigation_drawer.xml:(Where the ListView is stored in)
<ListView xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@color/darkred"
android:dividerHeight="1dp"
android:background="@color/white"
tools:context="bernd.slider.NavigationDrawerFragment"
android:id="@+id/navigation_drawer" />
Important is that I use an FragmentManager to load the content from a specific page into R.id.container (activity_main_window.xml).
So how can I change the style? I don't understand where...
No comments:
Post a Comment