AAOS Car UI Library

Car UI Library

Summary

  • What can customization
    • Components --> Java classes that implement a specific behavior. For example, CarUiRecyclerView and Toolbar
    • Resources --> Individual Android resources that represent the knobs available for OEMs to achieve consistency with their own design. The components above use these resources to become customizable
  • How to customization
    • TargetApp to integrate the Car UI Library
    • Build-time overlays for build AAOS
    • OverlayApp use dynamic runtime overlays (dynamic RRO)
    • OverlayApp use static runtime overlays (static RRO)

Comprehensive structure

car_ui_library_where.png

What can we do for different role

flow.png

Car UI Library

CULibrary.png

Run time resource overlays

RROs.png

What can customization in Car-UI-Library

  • preference

    ID|
    --|--:
    CarUiDropDownPreference|
    CarUiEditTextPreference|
    CarUiListPreference|
    CarUiMultiSelectListPreference|
    CarUiTwoActionPreference|
    CarUiRadioButtonPreference|
    CarUiSeekBarDialogPreference|
    CarUiSwitchPreference|
    CarUiTwoActionPreference|

  • recyclerView

    ID|
    --|--:
    GridDividerItemDecoration|
    GridOffsetItemDecoration|
    LinearDividerItemDecoration|
    LinearOffsetItemDecoration|
    CarUIListItem|
    CarUiCheckBoxListItem|
    CarUiContentListItem|
    CarUiHeaderListItem|
    CarUiRadioButtonListItem|
    CarUiSmoothScroller|
    FastScroller|

  • tool bar

    ID|
    --|--:
    MenuItem|
    ProgressBarController|
    SearchView|
    TabLayout|
    Toolbar|

  • Forcus

  • CarUxRestriction

https://cs.android.com/android/platform/superproject/+/master:packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/res-overlayable/values/overlayable.xml

How to customization

Build-time overlays

This customization is applied at Android system image build time. During the build, all apps in the system receive resources from their res folder and from overlay folders defined in the target makefiles.

Resource Overlays (RROs)

  • OverLayApk need do

Define the overlay resource map: The following code shows an example res/xml/overlays.xml file.



    
    
    

    
    

    
    

    
    

And link the resource map:


    
    

  • TargetApk need do

Define overlayable in the following example res/values/overlayable.xml file



       
               
               
       
       ...

Use the “policy” tag to enforce restrictions on overlayable resources. The type attribute specifies which policies an overlay must fulfill to override the included resources. Supported types include the following.

  • public. Any overlay can override the resource.
  • system. Any overlay on the system partition can override the resources.
  • vendor. Any overlay on the vendor partition can override the resources.
  • product. Any overlay on the product partition can override the resources.
  • signature. Any overlay signed with the same signature as the target APK can override the resources.

If the target package doesn't have a defined overlayable, the overlay must be preinstalled on the system image or signed with the same signature as the target to overlay the target package's resources.

你可能感兴趣的:(AAOS Car UI Library)