Android Architecture Components (Jetpack को भाग) मजबुत, रक्षणीय अनुप्रयोग बनाउन सहायता गर्ने पुस्तकालय हुन् — जसमा ViewModel (जीवनचक्र-सचेत अवस्था), LiveData/StateFlow (अवलोकनीय डेटा), र Room (डेटाबेस अमूर्तता) समावेश छन्। यिनले अनुशंसित आर्किटेक्चर ढाँचा समर्थन गर्छन्।
ViewModel — जीवनचक्र-सचेत अवस्था धारक
VIEWMODEL holds UI-related state and logic, SURVIVING configuration changes:
→ state stored in a ViewModel SURVIVES screen rotation (the activity recreates, but the
ViewModel persists) → solves the lost-state-on-rotation problem
→ separates UI logic from the Activity/Fragment (the View just observes/displays)
