我在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" />
您的代码看起来不错,请检查您的drawable
资源。它显示在xml
布局文件上吗?
添加以下缺少的字段。我认为它将解决您的问题。