• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

access layout from class

umtblbl

Member
Hello,
How do I access a layout component from within a class? For example, a button from within the User class?
 
Use findViewById() to get a reference to a UI component e.g. Button.
 
Back
Top Bottom