WindowManagerService之AppWindowAnimator筆記,appwindowanimator

來源:互聯網
上載者:User

WindowManagerService之AppWindowAnimator筆記,appwindowanimator

文章僅記錄自己的一點理解,僅供自己參考。

這篇文章將詳細記錄AppWindowAnimator中的主要成員變數及函數的作用。

AppWindowAnimator是Activity動畫類。每一個Activity對象在WMS中對應一個AppWindowToken對象,而AppWindowToken中包含一個AppWindowAnimator對象,也就是說一個Activity便對應有一個AppWindowAnimator對象,這個對象儲存在與Activity對應的AppWindowToken中。這個從AppWindowToken的建構函式中可以看出來:

    AppWindowToken(WindowManagerService _service, IApplicationToken _token) {        super(_service, _token.asBinder(),                WindowManager.LayoutParams.TYPE_APPLICATION, true);        appWindowToken = this;        appToken = _token;        mInputApplicationHandle = new InputApplicationHandle(this);        mAnimator = service.mAnimator;        mAppAnimator = new <span style="color:#cc0000;background-color: rgb(255, 255, 255);">AppWindowAnimator</span>(this);    }

1、mAppToken

new一個AppWindowAnimator時把this(AppWindowToken)作為參數傳進去,儲存在AppWindowAnimator.mAppToken中,換句話說就是mAppToken儲存的是該動畫是屬於哪個AppWindowToken的,進一步說就是屬於哪個Activity的。

    public AppWindowAnimator(final AppWindowToken atoken) {        <span style="color:#ff6666;">mAppToken </span>= <span style="color:#ff6666;">atoken</span>;        mService = atoken.service;        mAnimator = atoken.mAnimator;    }
2、








聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.