Skip to content

Commit 3542aad

Browse files
authored
Merge pull request #129 from deepueg/fix-menu-override
Update the menu id reference
2 parents 60595ea + 3b0d8be commit 3542aad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

android/moviesreloaded/src/main/java/com/walmartlabs/moviesreloaded/demo/navmenuhandler/MenuItemDemoFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected ElectrodeNavigationFragmentDelegate createFragmentDelegate() {
2828
@Nullable
2929
@Override
3030
public MenuItemProperties menuItemPropertiesFor(@NonNull NavigationBarButton rightButton) {
31-
if ("MoviesReloaded.refresh".equals(rightButton.getId())) {
31+
if ("refresh".equals(rightButton.getId())) {
3232
return new DefaultMenuItemProperties.Builder()
3333
.icon(R.drawable.ic_refresh_24px)
3434
.itemId(R.id.refresh)
@@ -50,7 +50,7 @@ public int homeAsUpIndicatorOverride(@NonNull String iconName) {
5050
// 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.
5151
@Override
5252
public boolean onNavBarButtonClicked(@NonNull NavigationBarButton button, @NonNull MenuItem item) {
53-
if ("MoviesReloaded.about".equals(button.getId())) {
53+
if ("about".equals(button.getId())) {
5454
Toast.makeText(getActivity(), "Clicked about button", Toast.LENGTH_SHORT).show();
5555
//Returning false here will send an OnButtonClicked event to the react native component as well.
5656
//Return true when you don't want RN to control this button click.

0 commit comments

Comments
 (0)