When I add ImageButtons to my app (they don't have background), the app crashes. I have following code:
<ImageButton
android:id="@+id/ib_main_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/home"
android:background="@null"
android:scaleType="fitCenter"
/>
<ImageButton
android:id="@+id/ib_main_categories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/categories"
android:background="@null"
android:scaleType="fitCenter"
/>
<ImageButton
android:id="@+id/ib_main_actors"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/actors"
android:background="@null"
android:scaleType="fitCenter"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/twitter"
android:background="@null"
android:scaleType="fitCenter"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/facebook"
android:background="@null"
android:scaleType="fitCenter"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/instagram"
android:background="@null"
android:scaleType="fitCenter"
/>
(Whole xml is in RelativeLayout)... Without @null, image shows bigger than the screen. And Button fills the whole screen. Anyone can help me?