mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-07 16:29:55 +00:00
Improve: MaterialTextView takes care of TextColor
This commit is contained in:
parent
ed49230d4e
commit
113f62954f
@ -385,7 +385,6 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
itemView as MaterialTextView
|
||||
itemView.typeface = TypefaceExtra.medium
|
||||
itemView.setTextSizeScaled(14)
|
||||
itemView.setTextColor(itemView.context.getColorFromAttr(android.R.attr.textColor))
|
||||
itemView.background =
|
||||
ResourcesCompat.getDrawable(
|
||||
itemView.resources,
|
||||
@ -414,7 +413,6 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
init {
|
||||
itemView as MaterialTextView
|
||||
itemView.setTextSizeScaled(15)
|
||||
itemView.setTextColor(itemView.context.getColorFromAttr(android.R.attr.textColor))
|
||||
itemView.resources.sizeScaled(16).let { itemView.setPadding(it, it, it, it) }
|
||||
itemView.movementMethod = ClickableMovementMethod
|
||||
itemView.layoutParams = RecyclerView.LayoutParams(
|
||||
|
@ -14,7 +14,6 @@
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?android:attr/textColor"
|
||||
android:tintMode="src_in"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@ -30,7 +29,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -38,7 +36,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
@ -26,7 +26,6 @@
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
@ -17,14 +17,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
@ -36,7 +36,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -44,7 +43,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="14sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
@ -39,7 +39,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -56,7 +55,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
@ -31,7 +31,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:textColor"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@ -63,7 +62,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@ -95,7 +93,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:textColor"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@ -136,7 +133,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:textColor"
|
||||
android:textSize="12sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -33,7 +33,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp"
|
||||
tools:ignore="InefficientWeight" />
|
||||
|
||||
@ -64,7 +63,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
@ -13,7 +13,6 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
|
@ -14,7 +14,6 @@
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
@ -23,7 +22,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_arrow_down"
|
||||
android:tint="?android:attr/textColor"
|
||||
android:tintMode="src_in"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
|
@ -10,7 +10,6 @@
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -18,7 +17,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="?android:attr/textColor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
Loading…
x
Reference in New Issue
Block a user