提问前还是多翻翻文档或者源代码吧 xml方法: appcompat:itemBackground="@drawable/menu_background_color" //background 代码方法: public class NavigationView extends ScrimInsetsFrameLayout { public void setItemBackgroundResource(@DrawableRes int resId) {} public void setItemBackground(@Nullable Drawable itemBackground) {} } How to customize item background and item text color inside NavigationView?
xml方法:
代码方法:
How to customize item background and item text color inside NavigationView?