美文网首页
ListView 更新View

ListView 更新View

作者: haoxpZzz | 来源:发表于2017-11-10 10:44 被阅读0次

    ListView更新

    notifyDataSetChanged只检查List对象的内存,不能将其内存地址改变:

    List<String> msgs;
    //构造函数
    Adapter(Context context, int textViewresourceId, List<HeMsg> objects);
    
    

    若再为msgs赋值,则notifyDataSetChanged不起作用

    相关文章

      网友评论

          本文标题:ListView 更新View

          本文链接:https://www.haomeiwen.com/subject/ngtbmxtx.html