res: factorize text styles

This commit is contained in:
dece 2022-01-05 15:58:56 +01:00
parent 781a4a66b0
commit 685d60a09b
9 changed files with 34 additions and 46 deletions

View file

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text_view" android:id="@+id/text_view"
android:textSize="16sp"
android:textColor="@color/text"
android:textStyle="italic"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/CometText"
android:textStyle="italic"
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="16dp" android:paddingEnd="16dp" />
android:paddingTop="2dp"
android:paddingBottom="4dp" />

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dp" android:layout_width="2dp"
android:layout_height="4dp" /> android:layout_height="1dp"
android:backgroundTint="@color/teal_700" />

View file

@ -1,12 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text_view" android:id="@+id/text_view"
android:textSize="16sp"
android:textColor="@color/teal_700"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" style="@style/CometText"
android:paddingEnd="16dp" android:textColor="@color/teal_700"
android:paddingTop="2dp"
android:paddingBottom="4dp"
android:textIsSelectable="false" /> android:textIsSelectable="false" />

View file

@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text_view" android:id="@+id/text_view"
android:textSize="16sp"
android:textColor="@color/text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/CometText"
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="16dp" android:paddingEnd="16dp" />
android:paddingTop="2dp"
android:paddingBottom="4dp" />

View file

@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text_view" android:id="@+id/text_view"
android:textSize="16sp"
android:textColor="@color/text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" style="@style/CometText" />
android:paddingEnd="16dp"
android:paddingTop="2dp"
android:paddingBottom="4dp" />

View file

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text_view" android:id="@+id/text_view"
android:textSize="30sp"
android:textColor="@color/text"
android:textStyle="bold"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" style="@style/CometText"
android:paddingEnd="16dp" android:textSize="30sp"
android:paddingTop="16dp" android:textStyle="bold"
android:paddingBottom="4dp" /> android:paddingTop="16dp" />

View file

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text_view" android:id="@+id/text_view"
android:textSize="24sp"
android:textColor="@color/text"
android:textStyle="bold"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" style="@style/CometText"
android:paddingEnd="16dp" android:textSize="24sp"
android:paddingTop="8dp" android:textStyle="bold"
android:paddingBottom="4dp" /> android:paddingTop="8dp" />

View file

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text_view" android:id="@+id/text_view"
android:textSize="18sp"
android:textColor="@color/text"
android:textStyle="bold"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" style="@style/CometText"
android:paddingEnd="16dp" android:textSize="18sp"
android:paddingTop="8dp" android:textStyle="bold"
android:paddingBottom="4dp" /> android:paddingTop="8dp" />

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CometText">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/text</item>
<item name="android:paddingStart">16dp</item>
<item name="android:paddingEnd">16dp</item>
<item name="android:paddingTop">2dp</item>
<item name="android:paddingBottom">4dp</item>
</style>
</resources>