Ramotion/circle-menu-android

open() shows only 1 (second) button

lidialibelle opened this issue · 4 comments

When I open menu programmatically by calling open(true/false) menu opens, but only 1 button is present out of 3. Version I use : 0.3.1 .

Can't reproduce your issue. Can you provide your xml layout and buttons plus colors arrays?

Hi, @lidialibelle. Try this code, to open menu immediately:

final CircleMenuView menu = view.findViewById(R.id.circle_menu);
menu.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
        @Override
        public void onGlobalLayout() {
                menu.getViewTreeObserver().removeOnGlobalLayoutListener(this);
                menu.open(true);
        }
});