如何在 EditText 中启用 "Copy-paste" 菜单?

How can enable the "Copy-paste" menu in EditText?

我在 Android 中使用 editText,但是当我想要 select 时,复制或粘贴 text/number 到 ediTText 里面是不可能的,也就是说,如果我按 (Long按)不要向 select "paste" 或任何东西显示菜单。 我的 xml 文件 (EditText) 中的代码是下一个:

<com.rengwuxian.materialedittext.MaterialEditText
    android:id="@+id/titulo_articulo_periodico"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="4dp"
    android:maxLines="1"
    android:inputType="text"
    android:singleLine="true"
    android:textIsSelectable="true"
    android:hint="@string/periodico_hint1"
    android:textColor="@color/text_color"
    app:met_primaryColor="@color/refresco"
    app:met_clearButton="true"/>

我使用 "Material EditText" 库 (github: https://github.com/rengwuxian/MaterialEditText) 但我没有看到我的代码和所有者代码之间的区别,我的朋友告诉我我需要使用onActionItemClicked 在每个 editText 中,但是对于此代码,我的 Java 代码太长了。我不知道怎么办,我累了。 :(

我认为没有捷径可走。您必须使用剪贴板管理器,并且需要很长的时间来实现该功能。我仍在寻找一个简单的解决方案。在那之前参考这个 link https://developer.android.com/guide/topics/text/copy-paste.html