Is there any way to access a layout\'s view from a non-Activity-derived class? I\'m creating an Accordion class and need to access some of the activity\'s UI elements. I\'
Activity's context is in fact the Activity class itself. Assuming that this object will live inside only one Activity, it should be safe to pass object of type Activity to it. Otherwise, think about reengineering your Accordion class.