I've implemented a Navigation Drawer (without many modifications to the Android Developers example) I changed only the background colors of the ListView and the Text of the items:
layout / activity_main.xml:
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- As the main content view, the view below consumes the entire
space available using match_parent in both dimensions. -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- android:layout_gravity="start" tells DrawerLayout to treat
this as a sliding drawer on the left side for left-to-right
languages and on the right side for right-to-left languages.
The drawer is given a fixed width in dp and extends the full height of
the container. A solid background is used for contrast
with the content view. -->
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:dividerHeight="0dp"
android:background="#ffe1e1e1"/>
</android.support.v4.widget.DrawerLayout>
layout / drawer_list_item.xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="?android:attr/activatedBackgroundIndicator">
<ImageView
android:id="@+id/icon"
android:layout_width="25dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:contentDescription="@string/list_item_icon"
android:src="@drawable/ic_logo_icone"
android:layout_centerVertical="true"/>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:gravity="center_vertical"
android:paddingLeft="45dp"
android:paddingRight="16dp"
android:textColor="#ff555555"
android:textStyle="bold"
android:hint="@string/item_desc"
android:background="?android:attr/activatedBackgroundIndicator"
android:minHeight="?android:attr/listPreferredItemHeightSmall" />
</RelativeLayout>
And here's my Navigation Drawer:
The problem, as you can see, is that when the item is selected, the blue color overlaps the Icon, making it more erased, and the color of the text is also overlaid with a slight shade change.
I would like my icon and my text to have no color change, which would turn blue only in the white areas of the view. I already tried many settings in the XMLs and tried to do other things programatically as well, but nothing solved.