markormesher / android-fab

Floating action button (FAB) for Android with speed-dial menu functionality
Apache License 2.0
211 stars 29 forks source link

Unable to open speed dial menu automatically #39

Closed himgupta229 closed 6 years ago

himgupta229 commented 6 years ago

Hi,

In my layout I am having recycler view. Initially I put floating action button as hidden I want that whenever i click on any recyclerview item fab should get visible and speed dial menu should open and when after opening the speed dial menu clicking on content cover speed dial menu should first close and then gets hidden. I tried it using an interface to get the click event of recyclerview item and checked for speed dialmenu is opened or not then tried to toggle that.But speed dial menu is not opening it is getting opened all menu items get overlapped.Below is my code.

interface callback: public void onLongPressed() { if(floatingActionButton.isSpeedDialMenuOpen()){ floatingActionButton.hide(true); floatingActionButton.setVisibility(View.GONE); }else { floatingActionButton.setVisibility(View.VISIBLE); floatingActionButton.setContentCoverEnabled(true); floatingActionButton.setContentCoverColour(0xffff9900); floatingActionButton.setContentCoverEnabled(true); floatingActionButton.callOnClick(); } } where floatingActionButton is initialised as in onCreate of activity floatingActionButton = findViewById(R.id.fabMenu); floatingActionButton.setSpeedDialMenuAdapter(new CustomSpeedMenuAdapter(this));

In layout

markormesher commented 6 years ago

Hey @himgupta229. I saw that you closed this - did you fix the problem?

himgupta commented 6 years ago

hi .no opened it again with my personal github id.