Android - Showing Dialog from custom component
<p>I am writing a custom component (derived from a relative layout) which has to show a dialog, 
Is there a way to do this using callbacks like oncreatedialog or onpreparedialog?</p>

<p>if not: if i have to create the dialog outside oncreatedialog, i have to "attach it to an Activity with setOwnerActivity(Activity)". How can the custom component access the activity it is used in, when it is used in the activity's xml-layout and not created from code?</p>
