Add doc and fix a small mistake on style

This commit is contained in:
Benoit Marty 2021-06-16 10:40:22 +02:00
parent 1eee3fa0e8
commit d7884fe4d2
6 changed files with 19 additions and 9 deletions

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Source: https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1336%3A17796
-->
<style name="TextView.Vector" parent="Widget.MaterialComponents.TextView" />
<!-- Note: lineHeight attribute cannot be added in textAppearance style -->

View File

@ -1,9 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Doc: https://medium.com/androiddevelopers/whats-your-text-s-appearance-f3a1729192d
<!--
Source: https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1336%3A17796
Doc: https://medium.com/androiddevelopers/whats-your-text-s-appearance-f3a1729192d
List of supported attributes for a TextAppearance:
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/attrs.xml#4723-->
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/attrs.xml#4723
Do not use TextAppearance style directly, use TextView.Vector style instead
-->
<style name="TextAppearance.Vector.Title" parent="TextAppearance.MaterialComponents.Headline3">
<item name="fontFamily">sans-serif</item>

View File

@ -22,7 +22,7 @@
<TextView
android:id="@+id/loginCaptchaNotice"
style="@style/TextAppearance.Vector.Caption"
style="@style/TextView.Vector.Caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"

View File

@ -20,7 +20,7 @@
<TextView
android:id="@+id/loginTermsTitle"
style="@style/TextAppearance.Vector.Title"
style="@style/TextView.Vector.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
@ -32,7 +32,7 @@
<TextView
android:id="@+id/loginTermsNotice"
style="@style/TextAppearance.Vector.Body"
style="@style/TextView.Vector.Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"

View File

@ -36,7 +36,7 @@
<TextView
android:id="@+id/loginTermsNotice"
style="@style/TextAppearance.Vector.Body"
style="@style/TextView.Vector.Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"

View File

@ -19,7 +19,7 @@
<TextView
android:id="@+id/adapter_item_policy_title"
style="@style/TextAppearance.Vector.Body"
style="@style/TextView.Vector.Body"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawablePadding="8dp"
@ -33,7 +33,7 @@
<TextView
android:id="@+id/adapter_item_policy_subtitle"
style="@style/TextAppearance.Vector.Caption"
style="@style/TextView.Vector.Caption"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"