android listview item height

前端 未结 7 1707
渐次进展
渐次进展 2020-12-07 17:53

Why when i use SimpleCursorAdapter for ListView i have items height in ListView like this - \"listview

7条回答
  •  天命终不由人
    2020-12-07 18:01

    Here is my solutions; It is my getView() in BaseAdapter subclass:

    public View getView(int position, View convertView, ViewGroup parent)
    {
        if(convertView==null)
        {
            convertView=inflater.inflate(R.layout.list_view, parent,false);
            System.out.println("In");
        }
        convertView.setMinimumHeight(100);
        return convertView;
    }
    

    Here i have set ListItem's minimum height to 100;

提交回复
热议问题