How to use a provider theme in an Android application

I am developing my "Hello, World" Android application and have bypassed something that annoys me.

The theme used for my AlertDialog application is not used for other such dialogs presented on the device. The device is HTC Desire HD, on which I changed the theme, but I was expecting standard user interface elements (like AlertDialog ) to somehow reflect the deviceโ€™s theme. Is this something I'm missing or maybe a problem with some vendors / models?

Here is my code:

 final AlertDialog.Builder confirm = new AlertDialog.Builder(this); confirm.setTitle("Delete") .setMessage("Really Delete?") .setPositiveButton("Delete", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // ... } }) .setNegativeButton("Cancel", null) .show(); 

And here is what the dialog looks like in different situations:

AlertDialog device with default theme (Messages app)

enter image description here

AlertDialog device with a modified theme (Messages application)

enter image description here

My AlertDialog app (with default and modified theme)

enter image description here

Thanks.

+4
source share
1 answer

Your guess is correct. HTC has developed custom dialogs for HTC applications.

0
source

Source: https://habr.com/ru/post/1340493/


All Articles