-2

在使用 react native 很长一段时间后,我正在研究 android,但我似乎在 android 中找不到任何关于 IconButtons 的信息,比如这里的:

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

谢谢

4

1 回答 1

1

ImageButton它在Android中称为an 。

<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" />
于 2020-08-27T12:54:09.460 回答