============= Miscellaneous ============= System Colors ============= Any `R.color `_ that starts with the prefix "**system_**" can be used as substitute for a CSS color. :: squared.settings.resourceSystemColors = { "system_accent1_0": "white", // Converted to ARGB "system_accent1_50": "#FFFFFF", // Will override "system_accent1_0" "system_accent1_100": ["white", 0.75], // Different color with opacity "system_accent1_200": "hwb(12 50% 0%)", // rgb + hsl "system_accent1_300": squared.lib.color.parseColor("#000", 1) }; .. note:: Android 12 :alt:`API 31` is required when using accent colors. [#]_ .. code-block:: :caption: `?attr/color* `_ squared.settings.preferMaterialDesign = "MaterialComponents"; // Required squared.settings.resourceSystemColors = { "system_accent1_0": "white", // Invalid "colorPrimary": "white", "colorSecondary": "rgb(255 0 0)" }; When any element uses a CSS color it will be substituted with the same value in the global system color map. This behavior can be disabled locally using dataset attributes. .. code-block:: html :caption: Active (highlight) :emphasize-lines: 1,3,5,10-12
Item 1 Item 2
Item 3
Item 4
Item 5
Item 6
Redirecting Output ================== Sometimes it is necessary to extract elements and append them into other containers for it to look identical on the Android device. Usually it is when you are using an `App widget `_ and never with the standard layouts. .. code-block:: html :emphasize-lines: 4
Item 1 Item 2 Item 3
  • Item 4
  • Item 5
.. code-block:: xml :emphasize-lines: 6 Item 1 Item 4 Item 3 Item 5 Item 2 .. note:: Using **target** into a *ConstraintLayout* or *RelativeLayout* container will not include automatic positioning. Redirection will fail if the :target:`target location` is not a block/container element. .. [#] https://source.android.com/docs/core/display/dynamic-color