From c357b92b6138f532c03078a9478c4cb8466ca733 Mon Sep 17 00:00:00 2001 From: Patryk Goworowski Date: Mon, 11 Nov 2024 21:31:51 +0100 Subject: [PATCH] Add the documentation to `attrs.xml` This was co-authored by Copilot --- .../vico/views/common/theme/ComponentStyle.kt | 14 +- vico/views/src/main/res/values/attrs.xml | 163 +++++++++++++++++- 2 files changed, 162 insertions(+), 15 deletions(-) diff --git a/vico/views/src/main/java/com/patrykandpatrick/vico/views/common/theme/ComponentStyle.kt b/vico/views/src/main/java/com/patrykandpatrick/vico/views/common/theme/ComponentStyle.kt index beaacd133..337d41944 100644 --- a/vico/views/src/main/java/com/patrykandpatrick/vico/views/common/theme/ComponentStyle.kt +++ b/vico/views/src/main/java/com/patrykandpatrick/vico/views/common/theme/ComponentStyle.kt @@ -70,13 +70,6 @@ internal fun TypedArray.getComponent(context: Context): Component? = use { array val layeredComponent = when { - hasValue(R.styleable.ComponentStyle_overlayingComponentStyle) -> - getNestedTypedArray( - context = context, - resourceId = R.styleable.ComponentStyle_overlayingComponentStyle, - styleableResourceId = R.styleable.ComponentStyle, - ) - .getComponent(context) hasValue(R.styleable.ComponentStyle_layeredComponentStyle) -> getNestedTypedArray( context = context, @@ -109,12 +102,7 @@ internal fun TypedArray.getComponent(context: Context): Component? = use { array getRawDimension( context = context, index = R.styleable.ComponentStyle_layeredComponentPadding, - defaultValue = - getRawDimension( - context = context, - index = R.styleable.ComponentStyle_overlayingComponentPadding, - defaultValue = 0f, - ), + defaultValue = 0f, ) ), ) diff --git a/vico/views/src/main/res/values/attrs.xml b/vico/views/src/main/res/values/attrs.xml index acf4c95fe..1c4fa9bb3 100644 --- a/vico/views/src/main/res/values/attrs.xml +++ b/vico/views/src/main/res/values/attrs.xml @@ -15,47 +15,77 @@ --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -64,132 +94,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -199,64 +320,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +