码迷,mamicode.com
首页 > 其他好文 > 详细

public View getView(int position, View convertView, final ViewGroup parent)三个参数的意思

时间:2014-12-06 22:45:59      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:android   style   io   ar   os   sp   for   on   bs   

 

 

最近看到有人在问这三个参数的含义,其实帮助已经很详细的介绍了这三个参数,看来还是要好好学学英语了,不然连解释都看不懂。

 

 

 /**
     * Get a View that displays the data at the specified position in the data set. You can either
     * create a View manually or inflate it from an XML layout file. When the View is inflated, the
     * parent View (GridView, ListView...) will apply default layout parameters unless you use
     * {@link android.view.LayoutInflater#inflate(int, android.view.ViewGroup, boolean)}
     * to specify a root view and to prevent attachment to the root.
     * 
     * @param position The position of the item within the adapter‘s data set of the item whose view
     *        we want.
     * @param convertView The old view to reuse, if possible. Note: You should check that this view
     *        is non-null and of an appropriate type before using. If it is not possible to convert
     *        this view to display the correct data, this method can create a new view.
     * @param parent The parent that this view will eventually be attached to
     * @return A View corresponding to the data at the specified position.
     */

public View getView(int position, View convertView, final ViewGroup parent)三个参数的意思

标签:android   style   io   ar   os   sp   for   on   bs   

原文地址:http://www.cnblogs.com/zuiyirenjian/p/4148882.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!