using gridview with images in android
<p>this is the problematic code:</p>

<pre><code>public class Level1 extends Activity {

int[] logos = {
        R.drawable.arutz8,
        R.drawable.channel1,
        R.drawable.doctor_gav,
        R.drawable.foxgroup3,
        R.drawable.careline,
        R.drawable.golfnew,
        R.drawable.haaretz,
        R.drawable.hafenix,
        /*R.drawable.hando,
        R.drawable.bankleumi,
        R.drawable.jerusalempostred,
        R.drawable.laisha,
        R.drawable.logo,
        R.drawable.logodelta,
        R.drawable.maariv,
        R.drawable.pelephone,
        R.drawable.ravbariah,
        R.drawable.renuar,
        R.drawable.reshet_tv,
        R.drawable.sano,
        R.drawable.shilav,
        R.drawable.sport5,
        R.drawable.srigamish,
        R.drawable.steimatzky,
        R.drawable.superpharm,
        R.drawable.supersal,
        R.drawable.tambur,
        R.drawable.tzometsfarim,
        R.drawable.walla,
        R.drawable.yediot,*/
};

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.level1);
    ListAdapter adapter = (new ArrayAdapter&lt;Integer&gt;(this, R.layout.level1));

    GridView grid = (GridView) findViewById(R.id.gridview1);
    grid.setAdapter(new ImageAdapter(this));
}


private class ImageAdapter extends BaseAdapter 
{
    private Context context;

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

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

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

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

    //---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(90, 90));
            imageView.setScaleType(ImageView.ScaleType.FIT_XY);
            imageView.setPadding(5, 5, 5, 5);
        } else {
            imageView = (ImageView) convertView;
        }
        imageView.setImageResource(logos[position]);
        return imageView;
    }
} 
</code></pre>

<p>}</p>

<p>This program works perfectly as long as the size of all images is about 60px per each image. The problem in that size of image is that every image got constricted and its ugli!.
I tried to use in bigger images and for some reason only the first five images appears on the screen and when i try to load the rest images, the app crashes.
I thought that happens because of the size of the images but than i realized that all the images are in the same big size and still 5 of them were drawn on the screen.
Any ideas?</p>

<p>Those are the logs from logCat:</p>

<p><a href="http://i.imgur.com/xhM3I.png" rel="nofollow">logs</a></p>

<p>and this is the result when i press on the level 1 button:</p>

<p><a href="http://i.imgur.com/eHUln.png" rel="nofollow">result</a></p>
