【问题标题】:How do I make an IconButton in android? [closed]如何在 android 中制作 IconButton? [关闭]
【发布时间】:2020-08-27 12:53:02
【问题描述】:

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

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

谢谢

【问题讨论】:

    标签: android react-native react-native-paper


    【解决方案1】:

    在 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" />
    

    【讨论】:

      猜你喜欢
      • 2013-07-14
      • 2021-10-25
      • 2017-11-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-09
      • 1970-01-01
      • 2021-05-16
      相关资源
      最近更新 更多