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?
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
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,