Android – change the navigationview title text color

How to change the title text color in the navigation drawer. I'm using the latest support design library. The picture is as follows

resolvent:

Suppose you create it using a separate header XML file

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="178dp"
android:background="@drawable/background_poly"
android:orientation="vertical"
android:weightSum="1">



<LinearLayout
     android:layout_width="match_parent"
      android:layout_height="56dp"
     android:orientation="vertical"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true">

    <TextView
        android:id="@+id/name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:textColor="#ffffff"
        android:text="Akash Bangad"
        android:textSize="14sp"
        android:textStyle="bold"

        />

    <TextView
        android:id="@+id/email"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#ffffff"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="5dp"
        android:text="akash.bangad93@gmail.com"
        android:textSize="14sp"
        android:textStyle="normal"

        />
</LinearLayout>

    <de.hdodenhof.circleimageview.CircleImageView
    android:layout_width="70dp"
    android:layout_height="70dp"
    android:src="@drawable/aka"
    android:layout_marginLeft="16dp"
    android:layout_marginTop="38dp"
    android:id="@+id/circleView"
   />
</RelativeLayout>

Just change the background color of the relative layout

This is the link I use http://www.android4devs.com/2014/12/how-to-make-material-design-navigation-drawer.html?m=1

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>