【问题标题】:Changing height of SCV icon in TextView field在 TextView 字段中更改 SCV 图标的高度
【发布时间】:2022-02-02 11:37:47
【问题描述】:

我想在一些文本旁边放一个箭头。所以我将 *.scv 箭头图标导入到 TextView 字段中。现在我很难调整它的大小。我想将app:drawableStartCompat 设置为高度 100dp - 但我不知道该怎么做?

    <TextView
        android:id="@+id/textView2"
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:text="@string/introArrowDesc"
        android:justificationMode="inter_word"
        android:padding="5dp"
        app:drawableStartCompat="@drawable/ic_arrow_back_black_24dp">

【问题讨论】:

    标签: android xml android-studio android-layout textview


    【解决方案1】:

    我发现,在app =&gt; res =&gt; drawable 中,在导入 scv 文件时会生成一个 xml。所以我现在可以简单地改变那里的大小:

    android:width="100dp"
    android:height="100dp"
    

    然而,scv 文件的想法,如果我理解正确的话,是我可以随意调整它们的大小并在不同的地方使用不同的大小,所以问题仍然存在。

    【讨论】:

      猜你喜欢
      • 2016-12-14
      • 1970-01-01
      • 1970-01-01
      • 2011-11-05
      • 2015-01-14
      • 1970-01-01
      • 2022-11-15
      • 2017-04-07
      • 2018-08-31
      相关资源
      最近更新 更多