AbstractListView源码分析1

public abstract class AbsListView extends AdapterView<ListAdapter> implements TextWatcher,ViewTreeObserver.OnGlobalLayoutListener, Filter.FilterListener,
        ViewTreeObserver.OnTouchModeChangeListener,

        RemoteViewsAdapter.RemoteAdapterConnectionCallback {

其中这是类的继承的相关的知识点为:

ViewTreeObserver:这是一个注册监听视图树的观察者(Observer),在视图树中全局时间改变时得到通知。这个全局事件不仅包括这个树的布局,从绘画开始,触摸模式的盖帽等。VieTreeObserver不能被应用程序实例化,因为它是有视图提供,参照getViewTreeObserver()。



 /**
     * Disables the transcript mode.,禁用掉相关的自动滑动到底部的属性,
     *
     * @see #setTranscriptMode(int)
     */
    public static final int TRANSCRIPT_MODE_DISABLED = 0;
    /**
     * The list will automatically scroll to the bottom when a data set change
     * notification is received and only if the last item is already visible
     * on screen.如果可见的情况下自动滑动到底部。
     * @see #setTranscriptMode(int)
     */
    public static final int TRANSCRIPT_MODE_NORMAL = 1;
    /**
     * The list will automatically scroll to the bottom, no matter what items
     * are currently visible.,无论是否可见就滑动到底部
     * @see #setTranscriptMode(int)
     */
    public static final int TRANSCRIPT_MODE_ALWAYS_SCROLL = 2;
    /**



/**
     * Indicates that we are not in the middle of a touch gesture,表明我们不在一个触摸手势的中心
     */
    static final int TOUCH_MODE_REST = -1;


    /**
     * Indicates we just received the touch event and we are waiting to see if the it is a tap or a
     * scroll gesture.表明我们仅仅收到触摸事件和我们等待开是否是一个tap或者一个滑动手势
     */
    static final int TOUCH_MODE_DOWN = 0;


    /**
     * Indicates the touch has been recognized as a tap and we are now waiting to see if the touch
     * is a longpress表明现在收到的是一个tap,现在我们等待是否是一个长按事件
     */
    static final int TOUCH_MODE_TAP = 1;


    /**
     * Indicates we have waited for everything we can wait for, but the user's finger is still down,表明我们已经等待了一切我们等待的事情,但是用户仍然在按下
     */
    static final int TOUCH_MODE_DONE_WAITING = 2;


    /**
     * Indicates the touch gesture is a scroll,表明一个手势是一个滑动
     */
    static final int TOUCH_MODE_SCROLL = 3;


    /**
     * Indicates the view is in the process of being flung,表明视图是个flung的过程
     */
    static final int TOUCH_MODE_FLING = 4;


    /**
     * Indicates the touch gesture is an overscroll - a scroll beyond the beginning or end.表明触摸手势是overscroll
     */
    static final int TOUCH_MODE_OVERSCROLL = 5;


    /**
     * Indicates the view is being flung outside of normal content bounds,表明视图是被flung到正常内容的边界
     * and will spring back.
     */
    static final int TOUCH_MODE_OVERFLING = 6;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值