gpt4 book ai didi

android - 想在 Button 上添加图标,drawableTop 在 Android 上不起作用

转载 作者:行者123 更新时间:2023-12-01 15:43:09 24 4
gpt4 key购买 nike

我想在 上添加通话图标按钮 但 drawableTop 不工作。

<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp">
<Button
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:drawableTop="@android:drawable/ic_menu_call"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>

enter image description here

最佳答案

更换您的 ButtonAppCompatButton

<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp">

<android.support.v7.widget.AppCompatButton
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawableTop="@android:drawable/ic_menu_call"/>
</LinearLayout>

关于android - 想在 Button 上添加图标,drawableTop 在 Android 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54253214/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com