@SuppressLint("InflateParams")
    @Override
    public View onCreateActionView() {

        View view = null;

        if (navigationSource != null) {

            final LayoutInflater layoutInflater = LayoutInflater.from(context);
            view = layoutInflater.inflate(R.layout.navigation_action, null);

            final View navItem = view.findViewById(R.id.default_navigation_action);

            navItem.setOnClickListener(v -> navigationSource.startDefaultNavigation());

            navItem.setOnLongClickListener(v -> {
                navigationSource.startDefaultNavigation2();
                return true;
            });
        }

        return view;

    }
Creates a new instance. ActionProvider classes should always implement a
constructor that takes a single Context parameter for inflating from menu XML.

@param context Context for accessing resources.
main/src/main/java/cgeo/geocaching/ui/NavigationActionProvider.java