How to get larger icons in gridview for tablet
<p>I made a layout with a gridview for small screens (2.7 inch). My icons are 48 x 48 px. Now i want the gridview on a tablet so i created a new layout and changed the settings to large and landscape. I want to use larger icons for the tablet: 72 x 72 px. The problem is that the larger icons not showing up but the small icons does. My small icons are in the folder drawable-mdpi and the large icons are in the folder drawable-hdpi. I tried allready to move the large icons to the drawable-xhdpi folder but without success. I also tried to change the scaletype and the layoutparams of the imageadapter but also without any success Can someone help me to get the larger icons on the tablet? </p>

<p>Here is my code of the large layout:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/back" &gt;



&lt;GridView
    android:id="@+id/Menu"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/imageView1"
    android:columnWidth="80dp"
    android:gravity="center_horizontal|top"
    android:horizontalSpacing="130dp"
    android:numColumns="auto_fit"
    android:paddingTop="10dp"
    android:scrollbars="none"
    android:stretchMode="columnWidth"
    android:verticalSpacing="50dp" android:layout_marginTop="50dip"&gt;

&lt;/GridView&gt;

&lt;ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:src="@drawable/title" /&gt;

&lt;/RelativeLayout&gt;
</code></pre>

<p>The java code of my imageadapter for the gridview is:</p>

<pre><code>public class ImageAdapter extends BaseAdapter 
{
    private Context context;

    public ImageAdapter(Context c) 
    {
        context = c;
    }

    //---returns the number of images---
    public int getCount() {
        return menu_icon.length;
    }

    //---returns the ID of an item--- 
    public Object getItem(int position) {
        return null;
    }

    public long getItemId(int position) {
        return 0;
    }

    //---returns an ImageView view---
    public View getView(int position, View convertView, ViewGroup parent) 
    {
        ImageView imageView;
        if (convertView == null) {
            imageView = new ImageView(context);
            imageView.setLayoutParams(new GridView.LayoutParams(150, 150));                 imageView.setScaleType(ImageView.ScaleType.CENTER);
            imageView.setPadding(5, 5, 5, 5);
        } else {
            imageView = (ImageView) convertView;
        }
        imageView.setImageResource(menu_icon[position]);
        return imageView;


    }
}
</code></pre>
