1
這裏是protected void View.onScrollChanged(int l, int t, int oldl, int oldt)
來源:關於)View.onScrollChanged來源(
/**
* This is called in response to an internal scroll in this view (i.e., the
* view scrolled its own contents). This is typically as a result of
* {@link #scrollBy(int, int)} or {@link #scrollTo(int, int)} having been
* called.
*
* @param l Current horizontal scroll origin.
* @param t Current vertical scroll origin.
* @param oldl Previous horizontal scroll origin.
* @param oldt Previous vertical scroll origin.
*/
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
postSendViewScrolledAccessibilityEventCallback();
}
mBackgroundSizeChanged = true;
final AttachInfo ai = mAttachInfo;
if (ai != null) {
ai.mViewScrollChanged = true;
}
}
的問題是關於這一行:final AttachInfo ai = mAttachInfo;
。爲什麼ai
被引入,爲什麼它被製成final
?
'mAttachInfo'以這種方式宣告以前寫的:'AttachInfo mAttachInfo;',所以它是不揮發。 ..但它似乎不應該是揮發性的描述行爲... – Prizoff 2013-03-14 11:44:16