|
@@ -8,6 +8,7 @@ import android.support.annotation.NonNull;
|
8
|
8
|
import android.support.annotation.RestrictTo;
|
9
|
9
|
import android.support.v7.widget.ActionMenuView;
|
10
|
10
|
import android.support.v7.widget.Toolbar;
|
|
11
|
+import android.view.Menu;
|
11
|
12
|
import android.view.MenuItem;
|
12
|
13
|
import android.widget.ImageButton;
|
13
|
14
|
import android.widget.TextView;
|
|
@@ -115,7 +116,7 @@ public class TitleBarButtonController extends ViewController<TitleBarReactButton
|
115
|
116
|
}
|
116
|
117
|
|
117
|
118
|
public void addToMenu(Toolbar toolbar, int position) {
|
118
|
|
- MenuItem menuItem = toolbar.getMenu().add(0, position, position, button.text.get(""));
|
|
119
|
+ MenuItem menuItem = toolbar.getMenu().add(Menu.NONE, position, position, button.text.get(""));
|
119
|
120
|
if (button.showAsAction.hasValue()) menuItem.setShowAsAction(button.showAsAction.get());
|
120
|
121
|
menuItem.setEnabled(button.enabled.isTrueOrUndefined());
|
121
|
122
|
menuItem.setOnMenuItemClickListener(this);
|