MaterialIntroView icon indicating copy to clipboard operation
MaterialIntroView copied to clipboard

How to show on action bar three dots view?

Open Morteza-Rastgoo opened this issue 9 years ago • 4 comments

How to show the showcaseView on action bar three dots?

Morteza-Rastgoo avatar Jan 08 '17 14:01 Morteza-Rastgoo

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;
}

diegolucasb avatar Jan 18 '17 12:01 diegolucasb

What is the overflow menu item id?

On Wed, Jan 18, 2017, 16:25 Lucas Diego [email protected] wrote:

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;

}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iammert/MaterialIntroView/issues/61#issuecomment-273468110, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-kCx8T3716OfTj0ebOoxDPLw1uHkYMks5rTgu2gaJpZM4LdsuH .

--

Morteza Rastgoo,

Android Developer at Fax.ir http://fax.ir/

moritech.ir

Morteza-Rastgoo avatar Jan 18 '17 13:01 Morteza-Rastgoo

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

diegolucasb avatar Jan 18 '17 16:01 diegolucasb

Of course I've been trying to find it, but no luck.

On Wed, Jan 18, 2017, 20:29 Lucas Diego [email protected] wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iammert/MaterialIntroView/issues/61#issuecomment-273534276, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-kC4w8pfpuCffsclG4kM98xt41FYw4ks5rTkT2gaJpZM4LdsuH .

--

Morteza Rastgoo,

Android Developer at Fax.ir http://fax.ir/

moritech.ir

Morteza-Rastgoo avatar Jan 19 '17 07:01 Morteza-Rastgoo