【问题标题】:I would Insert a text on image button in kottlin我会在 kotlin 的图像按钮上插入文本
【发布时间】:2021-09-02 05:47:30
【问题描述】:

我想在我的按钮中间放一个文本,但只能使用可能的按钮,但我有一个图像按钮

    android:id="@+id/imageButton3"
    android:layout_width="469dp"
    android:layout_height="171dp"
    android:textAlignment="center"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="@+id/imageView6"
    app:layout_constraintHorizontal_bias="0.532"
    app:layout_constraintStart_toStartOf="@+id/imageView6"
    app:layout_constraintTop_toTopOf="@+id/imageView6"
    app:layout_constraintVertical_bias="0.16"
    app:srcCompat="@drawable/bodybalance_desktop_fw20_com_selects_artworking2_960x560" />

【问题讨论】:

  • 嗨,您应该编辑您的问题并在代码部分中设置组件“

标签: android-studio kotlin imagebutton


【解决方案1】:

imagebutton 上使用button 并将buttonbackgroundTint 设置为null,这样它就会变得透明并且只显示上面的文字

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-03
    • 1970-01-01
    • 1970-01-01
    • 2015-07-06
    • 2011-04-26
    • 2011-01-08
    • 2018-03-04
    • 1970-01-01
    相关资源
    最近更新 更多