[XPD] Support Preference style injection
This change implements "style injection" for the following Preferences: - settingslib_expressive_preference - settingslib_expressive_two_target - settingslib_expressive_selector_with_widget ...where "style injection" means that the Preference's layouts do not directly reference any <style>s, but instead receive them via a corresponding theme <attr>. For each view within any layout associated with one of these preferences, there is now both an <attr> and a corresponding <style> defined for that view. Additionally, layouts sometimes <include> each other into a parent-child relationship, and some layouts have more than one possible parent (i.e., are <include>d by more than one other layout), and some apps may wish to vary a child-layout's style depending on its parent. This is supported here via "theme injection": each layout is passed an "android:theme" (i.e., a theme overlay) provided from its parent. For Preferences that have their own project outside of SettingsTheme, we define Preference's styles within their own project, rather than within SettingsTheme. But, because SettingsTheme cannot reference those projects, we have to apply these styles at runtime rather than within the themes defined in a SettingsTheme resource XML file. Bug: 375480783 Test: manual Flag: com.android.settingslib.widget.theme.flags.is_expressive_design_enabled Relnote: N/A Change-Id: Ice46cfd45cdc35aa809f78dfebeeafd3bbc22beb
Loading
Please register or sign in to comment