在ImageButton中显示图像

问题描述 投票:0回答:2

我在ImageButton中添加了一个图像,但是没有显示。为什么?

 <ImageButton
        android:id="@+id/next_button"
        android:layout_width="105dp"
        android:layout_height="53dp"
        android:src="@drawable/icons8-fast-forward-64" 
        android:contentDescription="@string/next_text" />
android android-studio imagebutton android-imagebutton
2个回答
0
投票

您的代码看起来不错,请检查您的drawable资源。它显示在xml布局文件上吗?


0
投票

添加以下缺少的字段。我认为它将解决您的问题。

© www.soinside.com 2019 - 2024. All rights reserved.