Skip to content

Commit

Permalink
Update the menu id reference
Browse files Browse the repository at this point in the history
  • Loading branch information
deepueg committed Jul 13, 2020
1 parent 60595ea commit 3b0d8be
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected ElectrodeNavigationFragmentDelegate createFragmentDelegate() {
@Nullable
@Override
public MenuItemProperties menuItemPropertiesFor(@NonNull NavigationBarButton rightButton) {
if ("MoviesReloaded.refresh".equals(rightButton.getId())) {
if ("refresh".equals(rightButton.getId())) {
return new DefaultMenuItemProperties.Builder()
.icon(R.drawable.ic_refresh_24px)
.itemId(R.id.refresh)
Expand All @@ -50,7 +50,7 @@ public int homeAsUpIndicatorOverride(@NonNull String iconName) {
// Return true if you handle click for an item click. Returning false will ensure that the click is delegated back to react native component for handling.
@Override
public boolean onNavBarButtonClicked(@NonNull NavigationBarButton button, @NonNull MenuItem item) {
if ("MoviesReloaded.about".equals(button.getId())) {
if ("about".equals(button.getId())) {
Toast.makeText(getActivity(), "Clicked about button", Toast.LENGTH_SHORT).show();
//Returning false here will send an OnButtonClicked event to the react native component as well.
//Return true when you don't want RN to control this button click.
Expand Down

0 comments on commit 3b0d8be

Please sign in to comment.