android4.1+ 系統下在自訂ListView中覆蓋onAttachedToWindow ()方法會導致滾動事件(OnScrol)和OnItemclick事件響應不了。
(請發郵件到 freeget.one@gmail.com
獲得最新翻強軟體。)
解決方案:
@Override
protected void onAttachedToWindow() {
// setSelection(1);
DebugUtils.i(TAG, "onAttachedToWindow()");
super.onAttachedToWindow(); // 必須 調用父方法
mRefreshViewText.setVisibility(View.GONE);
mRefreshView.setVisibility(View.GONE);
}
附帶 4.1 虛擬機器調試兩個小問題。請發郵件到freeget.one@gmail.com獲得翻強軟體
1、Android 啟動模擬器是出現“Failed to allocate memory: 8”錯誤,模擬器無法啟動:
原因:設定了不正確AVD顯示屏模式,4.0版預設的模式為WVGA800,改成WXGA720後導致不支援。
解決:編輯這個AVD,將Skin -> Build in的參數改回預設參數。
或者 重建立一個adv。。。
2、滑動報 “Unexpected value from nativeGetEnabledTags: 0” 錯誤。
這個是 4.1+的bug 找到 官網回應
it is a bug in version r21, it will be fixed soon according to google.
refer to http://code.google.com/p/android/issues/detail?id=39723
------
Comment 7 by project member vs...@google.com, Nov 16 (3 days ago)
We are aware of the issue and we are working on a fix.