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.

Ben Faingold
  • 563
  • 5
  • 12
  • Are you looking to add a popup menu over the highlighted text? – Eugene H May 13 '15 at 01:15
  • 2
    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. – Ben Faingold May 13 '15 at 08:39

1 Answers1

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

  • 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. – Ben Faingold Jun 18 '15 at 21:20
  • 7
    @BenFaingold How can I implement it pre android M devices? – Nitesh Kumar Jul 26 '15 at 09:49