findActivity

Return

the nearest Activity associated with this Context.

If this context is an Activity, it is returned directly. If it is a ContextWrapper, the base context chain is traversed until an Activity is found.

Throws

if no Activity can be found in the context chain.