1

I was wondering if there's any way to assign the default android theme on a context menu. I have a custom theme applied to my whole application in the android manifest,and I don't want to apply it individually to each activity.

I've been able to achieve this in a Toast with getApplicationContext(). This way my custom theme doesn't override the Toast default theme. Example:

Toast.makeText(getApplicationContext(), R.string.toast_agenda, Toast.LENGTH_SHORT).show();

Is there any way to do something similar on a ContextMenu?

Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
Daniel Higueras
  • 2,404
  • 22
  • 34

1 Answers1

1

I think you can try to change the alertDialogStyle in your custom theme. Hope this could meet your requirement.

faylon
  • 7,360
  • 1
  • 30
  • 28
  • As far as I've read [here](http://stackoverflow.com/questions/3118601/how-can-i-change-the-background-of-android-alert-dialogs) and [here](http://stackoverflow.com/questions/2524051/button-style-in-alertdialogs) this isn't possible without creating my own custom `Dialog`. Is there any way of just calling the default theme and not having to create a new `Dialog` class? – Daniel Higueras Sep 16 '11 at 14:37