Custoom floating toolbar for text selection controls

試著忘記壹切 提交于 2020-01-06 03:40:08

问题


I want to customize the floating toolbar that appears when you select a text.

This is an example of the standard floating toolbar:

.

Do you know how I can customize it (like adding Bold, Italic,...)? Is there an external library?

The Monospace app has exactly what I want:


回答1:


You’ll add an intent filter to an Activity in your manifest:

<activity
android:name=".ProcessTextActivity"
android:label="@string/process_text_action_name">
  <intent-filter>
    <action android:name="android.intent.action.PROCESS_TEXT" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="text/plain" />
  </intent-filter>
</activity>`


来源:https://stackoverflow.com/questions/38768857/custoom-floating-toolbar-for-text-selection-controls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!