floatingMenu icon indicating copy to clipboard operation
floatingMenu copied to clipboard

How can i set button to fix place not movable? and how can i change default icon of floating button and also set text with Icon?

Open kushanshah11 opened this issue 7 years ago • 2 comments

kushanshah11 avatar Jun 15 '18 09:06 kushanshah11

Kushanshah11 hi. Programatically you can set fab.setMovementStyle(MovementStyle.ANCHORED) for fixing the place..

For changing the default icon, you can use something like final int sdk = android.os.Build.VERSION.SDK_INT; if(sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) { fab_1.setBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.something) ); } else { fab_1.setBackground(ContextCompat.getDrawable(context, R.drawable.something)); }

at the worst case you can import the module to your app then can change it in your module.. But it shouldnt be required I believe

kilicpl avatar Aug 25 '18 20:08 kilicpl

Hello @kushanshah11 @kilicpl is right. The 'Anchored' keyword guarantees that the floating button is not moved around. To change the background of the Floating Menu, you can just treat the FloatingMenu as a simple Android View and change the background drawable. Regards,

rjsvieira avatar Oct 22 '18 13:10 rjsvieira