android4.1+ ListView 不滾動

來源:互聯網
上載者:User

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.

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.