本文介绍了移除];完成" ActionMode按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

0I'm在我的应用程序中使用startActionMode(ActionMode)。

0I'm using startActionMode(ActionMode) on my app.

在默认情况下它是加上酒吧的完成按钮,我想删除它。

By default it's add a "Done" button on the bar, I want to remove it.

此外,如果有一种方法来改变它的文字,我想知道的太多,会导致不同的描述不是完成可使动作是对应于它用来做什么的行为。

Also, if there's a way to change it's text, I want to know too, cause a different description than "Done" can make the action be correspondent to the behaviour of what it does.

推荐答案

即使我被套牢一样,我发现这种方式来解决这个问题。

Even I was stuck with same and I found this way to solve it.

int doneButtonId = Resources.getSystem().getIdentifier("action_mode_close_button", "id", "android");
LinearLayout layout = (LinearLayout) findViewById(doneButtonId);
TextView doneview = (TextView) layout.getChildAt(1);
doneview.setText("");

希望这有助于!

Hope this helps!!

这篇关于移除];完成" ActionMode按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 12:32
查看更多