我使用 TextView
和 drawableRight:
<TextView
android:id="@+id/text1_2"
android:drawableRight="@drawable/star"
android:layout_width="match_parent"
android:layout_height="20dp"
android:textColor="@color/grey_500"
android:textSize="@dimen/category_bottom_text_size" />
但是图像不会根据 textView
的高度进行缩放,只是裁剪。我尝试了不同的解决方案,例如为该图像使用位图文件并制作图像 .9
,但结果是一样的。
最佳答案
尝试在图像比例中使用.. textview
android:scaleX="0.5"
android:scaleY="0.5"
关于android - TextView 中的图像比例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53557490/