Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you change the 'Done' text in a CAB?

Android's documentation says a lot about CAB's, but nothing about how to change the text for "Done". Does anyone know how to?

Other Links:

  • http://developer.android.com/design/patterns/selection.html
  • http://developer.android.com/guide/topics/ui/menus.html#CAB
like image 951
ahodder Avatar asked Oct 29 '12 18:10

ahodder


2 Answers

The layout for "Done" are provided in layout and layout-large folders in the framework. This button can be styled using the attribute android:attr/actionModeCloseButtonStyle in the activity's theme. The style only covers the android:background of the button, as mentioned in styles.xml. Also, the string used for "Done" is within Android's scope (@string/action_mode_done). Hence, the string for the CAB cannot be changed.

like image 55
sriramramani Avatar answered Nov 12 '22 19:11

sriramramani


if you use ABS, this can help you

<string name="abs__action_mode_done"></string>
like image 31
Preetam Avatar answered Nov 12 '22 17:11

Preetam