Hi in my app there are 6 buttons and each has a background image,Problem is Image gets blur when setting as background.I have tried all the sizes but problem remains same.I also tried setting it for ImageView,Button and ImageButton.
What should be the size of the images if I'm setting as a background.
Here is my xml,Here is how it looks like..https://i.stack.imgur.com/GPUZF.jpg
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/tool_bar"
layout="@layout/tool_bar"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1">
<ImageButton
android:id="@+id/cstatn"
android:layout_width="0dp"
android:scaleType="fitXY"
android:layout_height="match_parent"
android:layout_weight="1"/>
<ImageButton
android:id="@+id/cclinic"
android:layout_width="0dp"
android:scaleType="fitXY"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:orientation="horizontal"
android:layout_weight="1" >
<ImageButton
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageButton
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:orientation="horizontal"
android:layout_weight="1" >
<ImageButton
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageButton
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>