Android layout resource problem
<p>i want to get views from layout defined in my layout folder but i get null pointer exception, i know that before i use findViewById i have to have the layout somewhere used in any activity so it gets initialized, is there anyway to get views from layout that has not been used in any activity cause i got one activity that uses layout which i dynamically change and in that layout i remove all of it's child views and apply one of the three layouts that i have aside as potential layouts to fill in the default activity's layout..</p>

<p>I need this to make dialogs cause i have one dialog that has one layout which is transparent and has attached onTouchListener and when i click the layout the dialog dismisses, now my idea is to get other layouts which have size defined and then fill in that layout in the default transparent layout of my custom dialog, and do this with any layout i could image so i can make dialogs from all the layouts i want..</p>

<p>Thanks, if you need anymore info about my idea please write me this is important to me!</p>
