I'm trying to find background view reference for a default AlertDialog. This is because I want to add a BrokenWindow animation when the dialog is closed. I browsed the layout for (holo) AlertDialog and the name of the id is @+id/parentPanel How can I get this reference? I cannot use findViewById(), since R.id.parentPanel is obviously not present in my resource. Any other way than having a custom layout for my alert dialog? Thanks for help
Asked
Active
Viewed 172 times
1 Answers
0
you should use a custom layout for your alert dialog. then you can use getView().findViewById(R.id.*your custom layout*);
to access. Its really simple to use a custom layout for your dialog and you can find out how in this post: How to implement a custom AlertDialog View

Community
- 1
- 1

Will Evers
- 934
- 9
- 17
-
sure! please mark my answer correct if it helped your problem – Will Evers Nov 11 '16 at 20:27
-
I did, but my reputation is lower than 15 so the result is not displayed. – Andrea Colombo Nov 12 '16 at 22:20