gpt4 book ai didi

android - TextView 中的图像比例

转载 作者:行者123 更新时间:2023-11-30 05:12:02 25 4
gpt4 key购买 nike

我使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com