如何在 android 中制作 IconButton?

How do I make an IconButton in android?

我在使用 React Native 一段时间后正在研究 android,我似乎无法在 android 中找到任何关于 IconButtons 的信息,就像这里的那些:

https://callstack.github.io/react-native-paper/icon-button.html

谢谢

它在 Android 中被称为 ImageButton

<ImageButton
    android:id="@+id/favorite_imageButton"
    android:layout_width="wrap_content"
    android:layout_height="48dp"
    android:layout_marginTop="@dimen/margin_extra_small"
    android:layout_marginEnd="@dimen/margin_extra_small"
    android:layout_marginBottom="@dimen/margin_extra_small"
    android:background="?selectableItemBackgroundBorderless"
    android:padding="@dimen/margin_extra_small"
    android:src="@drawable/ic_star_border"
    android:tint="?attr/colorOnBackground"       
    app:layout_constraintBottom_toBottomOf="@id/up_navigation_imageButton"
    app:layout_constraintRight_toLeftOf="@id/game_link_imageButton"
    app:layout_constraintTop_toTopOf="@id/up_navigation_imageButton"
    tools:src="@drawable/ic_star_border" />