Forum Community

Alert Dialog with vector graphic

I'am using the new android support library to show vector graphics.
Then I build a custom view with such a vector graphic.
Now I have an V7.App.AlertDialog, where I set the view to the custom view with the vector. If I call this AlertDialog from my MainActivity, everything works fine.
If I call this dialog from a PreferencesActivity, the vector graphic are not displayed.
I also tired in the PreferencesActivity:

protected override void OnCreate(Bundle bundle)
AppCompatDelegate.CompatVectorFromResourcesEnabled = true; // Also if I add this line after the 'base' line, it is not working.

So the question is, how can I show this View with a vector in an AlertDialog, which is called from a PreferencesActivity.

Thank you very much in advance for any solution.

PS: It wold be also great, if there is any solution to make the window's height and width only to 90%. So, the AlertDialog with a custom view wold not fill the whole screen. How to solve this with a LinearLayout as 'master' layout in the custom View?

Sign In or Register to comment.