Code example for AbsListView.LayoutParams

0
 
    public HomeGridAdapter(Context c, ArrayList<Story> items) {
        this.c = c;
        this.items = items;
        imageLoader = new ImageLoader(c);
        params = new LayoutParams(LayoutParams.MATCH_PARENT, 280);
    } 
 
    @Override 
    public int getCount() { 
        if (items != null)
            return items.size();
        return 0; 
    } 
 
    @Override 
    public Object getItem(int position) {
        if (items != null)
            return items.get(position);
        return null; 
    }