Google開機嚮導設置鎖屏界面title欄間隔修改

在谷歌開機嚮導界面有個設置鎖屏界面 title欄間隔與其他界面不一樣。經分析該界面調用的是設置裏面的源碼。
路徑如下:

packages\apps\Settings\src\com\android\settings\SetupChooseLockPassword.java
packages\apps\Settings\src\com\android\settings\SetupChooseLockPattern.java

分析代碼在代碼中onCreateView()方法增加一句話

        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                Bundle savedInstanceState) {
            mLayout = (SetupWizardLayout) inflater.inflate(
                    R.layout.setup_choose_lock_password, container, false);
            mLayout.setIllustrationAspectRatio(9.0f);//add
            mNavigationBar = mLayout.getNavigationBar();
            mNavigationBar.setNavigationBarListener(this);
            return mLayout;
        }

可以根據實際設備來設置setIllustrationAspectRatio(9.0f)中的值。
改動之後如下圖
這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章