Q:

change activity main drawer items text color android

NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);

	//items text color
    int[][] state = new int[][] {
            new int[] {-android.R.attr.state_enabled}, // disabled
            new int[] {android.R.attr.state_enabled}, // enabled
            new int[] {-android.R.attr.state_checked}, // unchecked
            new int[] { android.R.attr.state_pressed}  // pressed

    };

    int[] color = new int[] {
            Color.WHITE,
            Color.WHITE,
            Color.WHITE,
            Color.WHITE
    };

    ColorStateList colorStateList1 = new ColorStateList(state, color);


    //icons color
    int[][] states = new int[][] {
            new int[] {-android.R.attr.state_enabled}, // disabled
            new int[] {android.R.attr.state_enabled}, // enabled
            new int[] {-android.R.attr.state_checked}, // unchecked
            new int[] { android.R.attr.state_pressed}  // pressed

    };

    int[] colors = new int[] {
            Color.WHITE,
            Color.WHITE,
            Color.WHITE,
            Color.WHITE
    };
    ColorStateList colorStateList2 = new ColorStateList(states, colors);
    navigationView.setItemTextColor(colorStateList1);
    navigationView.setItemIconTintList(colorStateList2);
0
 <android.support.design.widget.NavigationView
    app:menu="@menu/drawer_view" <!-- add this line for items' text color -->
    app:itemTextColor="@color/colorWhite"> <!-- add this line for items' icons color -->
0
 <android.support.design.widget.NavigationView
    app:itemTextColor="@color/colorWhite"> <!-- add this line to edit items' color-->
    app:itemIconTint="@color/textColorPrimary"/> <!-- add this line is for items' icons color -->
0

New to Communities?

Join the community