From ca67fc71a6e3f97fdc14cf8fd4701815883c92a5 Mon Sep 17 00:00:00 2001 From: Helium314 Date: Sun, 5 Jan 2025 20:53:10 +0100 Subject: [PATCH] add info about labelFlags --- app/src/main/res/values/attrs.xml | 44 +++++++++++++++---------------- layouts.md | 4 ++- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 51e3936f..8efca7f8 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -251,39 +251,39 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + diff --git a/layouts.md b/layouts.md index 60c9c90d..f312f2d5 100644 --- a/layouts.md +++ b/layouts.md @@ -71,7 +71,9 @@ If the layout has exactly 2 keys in the bottom row, these keys will replace comm * `0.1` for phones * `0.09` for tablets * If the sum of widths in a row is greater than 1, keys are rescaled to fit on the screen -* `labelFlags`: allows specific effects, see [here](app/src/main/res/values/attrs.xml) in the section _keyLabelFlags_ for names and numeric values +* `labelFlags`: allows specific effects, see [here](app/src/main/res/values/attrs.xml#L251-L287) in the section _keyLabelFlags_ for names and numeric values + * Since json does not support hexadecimal-values, you have to use the decimal values in the comments in the same line. + * In case you want to apply multiple flags, you will need to combine them using [bitwise OR](https://en.wikipedia.org/wiki/Bitwise_operation#OR). In most cases this means you can just add the individual values, only exceptions are `fontDefault`, `followKeyLabelRatio`, `followKeyHintLabelRatio`, and `autoScale`. ## Labels In the simple format you only specify labels, in json layouts you do it explicitly via the `label` property.