Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show on action bar three dots view? #61

Open
Morteza-Rastgoo opened this issue Jan 8, 2017 · 4 comments
Open

How to show on action bar three dots view? #61

Morteza-Rastgoo opened this issue Jan 8, 2017 · 4 comments

Comments

@Morteza-Rastgoo
Copy link

How to show the showcaseView on action bar three dots?

@diegolucasb
Copy link

You have to navigate under the toolbar child views and look for the three dots menu id.
For example:

private View getToolbarMenuView(int id) {

    for (int toolbarChildIndex = 0; toolbarChildIndex < toolbar.getChildCount(); toolbarChildIndex++) {

        View view = toolbar.getChildAt(toolbarChildIndex);
        if (view instanceof ActionMenuView) {
            ActionMenuView menuView = (ActionMenuView) view;

            // All menu items
            for (int menuChildIndex = 0; menuChildIndex < menuView.getChildCount(); menuChildIndex++) {
                ActionMenuItemView itemView = (ActionMenuItemView) menuView.getChildAt(menuChildIndex);

                if (itemView.getId() == id) {
                    return itemView;
                }

            }

        }

    }
    return null;
}

@Morteza-Rastgoo
Copy link
Author

Morteza-Rastgoo commented Jan 18, 2017 via email

@diegolucasb
Copy link

Take a look at the Android source code! google it!

@Morteza-Rastgoo
Copy link
Author

Morteza-Rastgoo commented Jan 19, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants