设置gridview里面item的高度

public View getView( int position, View convertView, ViewGroup parent) {
         convertView = LayoutInflater.from(context).inflate(R.layout.item, null );
  
         AbsListView.LayoutParams param = new AbsListView.LayoutParams(
                android.view.ViewGroup.LayoutParams.FILL_PARENT,
                mGv.getHeight()/ROW_NUMBER);
         convertView.setLayoutParams(param);
  
         return convertView;
    }

你可能感兴趣的:(设置gridview里面item的高度)