android - Change save text for check-icon like Telegram on DialogFragment -


i created full-screen dialog using dialogfragment, shown here. in implementation, created menu xml file called on dialogfragment:

<menu xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools">     <item         android:id="@+id/action_save"         android:orderincategory="100"         android:title="inserir"         app:showasaction="always"/> </menu> 

the problem use check/confirm icon instead of default save message implied in material design, 1 telegram uses when trying edit group name (see below).

telegram editing group's name

is there default icon in android 1 in telegram? how change text icon?

there standard checkmark image asset. add project, navigate res/drawable directory in android studio , right click -> new -> image asset. in wizard opens, change "icon type" "action bar , tab icons", click on "clip art" button change icon. search "check" , you'll find it.

enter image description here

to change text new image, add android:icon attribute menu item, using name chose in above wizard.

<item     android:id="@+id/action_save"     android:orderincategory="100"     android:title="inserir"     android:icon="@drawable/checkmark"     app:showasaction="always"/> 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -