Floating toolbar with text selection controls
Asked Answered
P

1

8

I was researching all over the web to no avail. My app requires a floating toolbar which appears above a selected text because the default text selection controls are not accessible in a particular case and they also show up oddly in my activity with a translucent status bar and without an action bar. I found this from Google's design guidelines (More precisely from here) and there is no mention on how to do it.

Floating Toolbar

If someone knows how to make this, or is familiar with a library capable of such, I'd be very much grateful.

Paw answered 12/5, 2015 at 23:14 Comment(2)
Are you looking to add a popup menu over the highlighted text?Alleviator
The popup menu isn't necessary, just the ordinary Cut/Copy/Paste actions. I want that floating toolbar to simply replace the selection controls which normally appear in the action bar.Paw
O
3

If you are using Android Support Library revision 22.2, be aware that floating toolbars are not backward-compatible and appcompat takes control over ActionMode objects by default.

so this will only work on Android-M preview you can test by creating AVD M-preview emulator.

Here this link shows Behavior change

Orthostichy answered 18/6, 2015 at 14:31 Comment(2)
Thank you! Finally Google has brought us the floating toolbars. I've moved from the design I had before and I longer require them. However, thanks to you I now know that it finally exists and can be implemented with no hassle.Paw
@BenFaingold How can I implement it pre android M devices?Home

© 2022 - 2024 — McMap. All rights reserved.