I'm using Android Studio and created a navigation drawer using the template provided. I can't seem to figure out how to change control the styles at all. I want it to look something like this:
Here's my styles file (styles.xml):
<resources>
<!-- Main theme -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Brand colors -->
<item name="android:colorPrimary">@color/primary</item>
<item name="android:colorPrimaryDark">@color/primary_dark</item>
<item name="android:colorAccent">@color/accent</item>
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<!-- Navigation Drawer -->
<style name="ActionBar" parent="AppTheme">
<item name="android:background">@color/primary</item>
</style>
</resources>
And here's my main activity with the AppCompat drawer inside (activity_main.xml):
<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="com.intravene.MainActivity">
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"/>
<fragment
android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:name="com.intravene.NavigationDrawerFragment"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>
Sorry, I'm a bit new to Android development. What am I missing here?
No comments:
Post a Comment