Improve: Overall text appearance

This commit is contained in:
LooKeR 2021-11-14 00:39:59 +05:30
parent f290508ee2
commit cf430988c0
7 changed files with 17 additions and 19 deletions

View File

@ -339,7 +339,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
val actionTintNormal = action.context.getColorFromAttr(R.attr.colorSurface) val actionTintNormal = action.context.getColorFromAttr(R.attr.colorSurface)
val actionTintCancel = action.context.getColorFromAttr(R.attr.colorError) val actionTintCancel = action.context.getColorFromAttr(R.attr.colorError)
val actionTintOnNormal = action.context.getColorFromAttr(R.attr.colorOnSurface) val actionTintOnNormal = action.context.getColorFromAttr(android.R.attr.textColorPrimary)
val actionTintOnCancel = action.context.getColorFromAttr(R.attr.colorOnError) val actionTintOnCancel = action.context.getColorFromAttr(R.attr.colorOnError)
init { init {
@ -1186,7 +1186,6 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
holder.name.text = item.product.name holder.name.text = item.product.name
holder.packageName.apply { holder.packageName.apply {
text = item.product.packageName text = item.product.packageName
setTextSizeScaled(15)
} }
val action = action val action = action
holder.action.apply { holder.action.apply {

View File

@ -534,7 +534,6 @@ class TabsFragment : ScreenFragment() {
itemView as MaterialTextView itemView as MaterialTextView
itemView.gravity = Gravity.CENTER_VERTICAL itemView.gravity = Gravity.CENTER_VERTICAL
itemView.resources.sizeScaled(16).let { itemView.setPadding(it, 0, it, 0) } itemView.resources.sizeScaled(16).let { itemView.setPadding(it, 0, it, 0) }
itemView.setTextSizeScaled(16)
itemView.background = itemView.background =
context.getDrawableFromAttr(android.R.attr.selectableItemBackground) context.getDrawableFromAttr(android.R.attr.selectableItemBackground)
itemView.layoutParams = RecyclerView.LayoutParams( itemView.layoutParams = RecyclerView.LayoutParams(

View File

@ -34,16 +34,16 @@
android:id="@+id/name" android:id="@+id/name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:singleLine="true" android:singleLine="true"
android:textSize="17sp" /> android:textAppearance="?textAppearanceBody1" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/package_name" android:id="@+id/package_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
android:textSize="14sp" /> android:textAppearance="?textAppearanceBody2"
android:textColor="?android:attr/textColorSecondaryNoDisable" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@ -2,9 +2,9 @@
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android" <com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
style="?attr/materialCardViewFilledStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="72dp" android:layout_height="72dp">
style="?attr/materialCardViewFilledStyle">
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
@ -39,14 +39,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:singleLine="true" android:singleLine="true"
android:textSize="16sp" /> android:textAppearance="?textAppearanceBody1" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/status" android:id="@+id/status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxWidth="70dp" android:maxWidth="70dp"
android:singleLine="true" /> android:singleLine="true"
android:textAppearance="?textAppearanceCaption" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@ -55,7 +56,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
android:textSize="14sp" /> android:textColor="?android:attr/textColorSecondaryNoDisable"
android:textAppearance="?textAppearanceBody2" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@ -78,7 +78,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:singleLine="true" android:singleLine="true"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondaryNoDisable"
android:textSize="14sp" /> android:textSize="14sp" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
@ -87,7 +87,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:singleLine="true" android:singleLine="true"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondaryNoDisable"
android:textSize="14sp" /> android:textSize="14sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@ -97,7 +97,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondaryNoDisable"
android:textSize="14sp" /> android:textSize="14sp" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
@ -105,7 +105,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondaryNoDisable"
android:textSize="14sp" /> android:textSize="14sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@ -12,9 +12,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:fontFamily="sans-serif-medium" android:singleLine="true" />
android:singleLine="true"
android:textSize="14sp" />
<com.google.android.material.imageview.ShapeableImageView <com.google.android.material.imageview.ShapeableImageView
android:id="@+id/icon" android:id="@+id/icon"
@ -22,7 +20,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="center" android:scaleType="center"
android:src="@drawable/ic_arrow_down" android:src="@drawable/ic_arrow_down"
android:tintMode="src_in"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@ -10,6 +10,7 @@
android:id="@+id/title" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary"
android:textSize="12sp" /> android:textSize="12sp" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView