开发者

Android,Custom ListView not showing off correctly the Text

I have a custom LisView, in this ListView for each line I have a TextView and Imageview

how c开发者_StackOverflowould i make each line of my ListView Higher ??

Thanks for Helping!!!


You can make use of class ViewHolder

private class ViewHolder {
        TextView title1;
        ImageView image1;
    }

This in getView() method:

LayoutInflater inflater = LayoutInflater.from(getContext());
            convertView = inflater.inflate(yourLayoutFile, parent, false); 

By using this class and your custom xml file, you will be able to make your line of listview higher

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜