Add a button to the top right of action bar
问题 Is there a way I can add a button to the top right of my ActionBar , like where the default settings Button is? I removed the settings Button but I'd like to add a custom Button in it's place. 回答1: You can add a button by editing/create the menu xml file: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/action_name" android:icon="@drawable/you_resource_here"