For some reason, one of my fragments does not display images in the ImageButton. Here is the fragment layout code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.apbguides.apbreloadedguides.Guides.CreateGuideFragment" android:orientation="vertical"> <EditText android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:inputType="textMultiLine" android:ems="14" android:id="@+id/editText" android:background="#FFFFFF" android:padding="10dp" android:gravity="top|left" /> <LinearLayout android:gravity="bottom" android:layout_height="60dp" android:background="#FFFFFF" android:layout_centerVertical="true" android:layout_width="match_parent"> <ImageButton android:layout_width="wrap_content" android:layout_height="match_parent" android:drawable="@mipmap/ic_launcher"/> <Space android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1"/> <ImageButton android:layout_width="wrap_content" android:layout_height="match_parent" android:drawable="@mipmap/ic_launcher"/> <Space android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1"/> <ImageButton android:layout_width="wrap_content" android:layout_height="match_parent" android:drawable="@mipmap/ic_launcher"/> <Space android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1"/> <ImageButton android:layout_width="wrap_content" android:layout_height="match_parent" android:drawable="@mipmap/ic_launcher"/> <Space android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1"/> <ImageButton android:layout_width="wrap_content" android:layout_height="match_parent" android:drawable="@mipmap/ic_launcher"/> </LinearLayout> </LinearLayout> And here is a screenshot of what came out of it:
As you can see, empty ImageButton are visible from below, but for some reason there are no pictures in them. What could be the problem?

ImageButtonhas adrawableattribute? - Vladyslav Matviienko