0
  • /**
     * Notify any registered observers that the item at <code>position</code> has changed.
     * Equivalent to calling <code>notifyItemChanged(position, null);</code>.
     *
     * <p>This is an item change event, not a structural change event. It indicates that any
     * reflection of the data at <code>position</code> is out of date and should be updated.
     * The item at <code>position</code> retains the same identity.</p>
     *
     * @param position Position of the item that has changed
     *
     * @see #notifyItemRangeChanged(int, int)
     */
    public final void notifyItemChanged(int position) {
        mObservable.notifyItemRangeChanged(position, 1);
    }
    


    这是方法的说明,下标不要搞错。


    其实你传入一个参数的时候,它是更新了当前位置往前的所有内容


    如果你下标错了,你可以单独+1,或者-1验证一下即可。


    如果内容不多,你可以直接使用notifydatasetChange()


    1153952789488054272  评论     打赏       拉大锯
    相关问题
    彭于晏盐城分晏 · recyclerview
    2019-10-30 00:34 689 2
    痞子小小崔 · recyclerView
    2020-05-28 03:37 400 13
    葬礼上的假发 · Recyclerview
    2020-12-10 06:54 728 2
    Nuttertools · recyclerview联调
    2020-12-26 18:16 451 5