MaterialIntroView icon indicating copy to clipboard operation
MaterialIntroView copied to clipboard

Intro for menuItem

Open AbdelO07 opened this issue 9 years ago • 3 comments

Please, How to attach an intro to a menuItem ?

AbdelO07 avatar Apr 24 '16 12:04 AbdelO07

Hi @AbdelO07 I've made a pull request on this. In the meantime you can have a look at my repo. Here is the final result

art_toolbar

thomaskioko avatar May 10 '16 12:05 thomaskioko

Thanks for reply dude. that looks good (Y)

AbdelO07 avatar May 10 '16 16:05 AbdelO07

I solved the problem:

First, add this layoutChangeListener. It will fire two times, because the menu inflation

final View.OnLayoutChangeListener onLayoutChangeListener = new View.OnLayoutChangeListener() {
        @Override
        public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft,
                                   int oldTop, int oldRight, int oldBottom) {
            View mMenuSearchView = v.findViewById(R.id.menumain_configurarapi);
            if (mMenuSearchView != null) {
                mToolbar.removeOnLayoutChangeListener(this);

                //Put here your intro logic
                }
            }
        }
    };

FelipePedrotiRaymundo avatar Jul 12 '17 18:07 FelipePedrotiRaymundo