Hello.
I'm developing an Android application.
How can I center the title for a custom dialog that I'm using?
Thanks.
Hello.
I'm developing an Android application.
How can I center the title for a custom dialog that I'm using?
Thanks.
You've got some starting tips here for modifying the title of a dialog: http://stackoverflow.com/questions/820398/android-change-custom-title-view-at-run-time/866184#866184 Don't know if it can be centered(haven't tried), but if it's a custom View I guess it's very possible.
If you don't call AlertDialog.Builder.setIcon()
and AlertDialog.Builder.setTitle()
, then your custom dialog will not show the built-in/default title View. In this case you are able to add your custom title View:
AlertDialog.Builder.setView(View view)
As soon as it is you who create this View it is possible to implement any type of alignment.