Androidアプリのホーム画面によく使用する、NavigationDrawerの三本線アイコン(ハンバーグアイコン)の色を変更する方法です。
カスタムテーマを作成する
アイコン色の設定はここで行います。drawerArrowStyle属性で設定するので、下記のように記述します。
既に使用しているテーマがある場合は、drawerArrowStyeを追記する。
styles.xml
<style name="MyCustomTheme" parent="@style/Theme.AppCompat.Light">
<item name="drawerArrowStyle">@style/CustomDrawerArrowStyle</item>
</style>
<style name="CustomDrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="color">#0000ff</item>
</style>
カスタムテーマを使用するようにAndroidManifestに記述する
applicationタグの属性に追記。既にテーマを指定している場合は設定不要です。
AndroidManifest.xml
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/MyCustomTheme">
~~~
</application>
おわり!