zoukankan      html  css  js  c++  java
  • Lancher3默认桌面显示

    代码位置
    packages/apps/Launcher3/src/com/android/launcher3/Workspace.java

            mOriginalDefaultPage = mDefaultPage = a.getInt(R.styleable.Workspace_defaultScreen, 1);

    // 通过styleable name + _attr name得到属性值,如果没有定义则默认为1

    packages/apps/Launcher3/res/values/attrs.xml

        <declare-styleable name="Workspace">
            <!-- The first screen the workspace should display. -->
            <attr name="defaultScreen" format="integer"  />
            <!-- The number of horizontal cells in the CellLayout -->
            <attr name="cellCountX" format="integer"  />
            <!-- The number of vertical cells in the CellLayout -->
            <attr name="cellCountY" format="integer"  />
        </declare-styleable>

    packages/apps/Launcher3/layout-port/launcher.xml

            <com.android.launcher3.Workspace
                android:id="@+id/workspace"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                launcher:defaultScreen="@integer/config_workspaceDefaultScreen"
                launcher:pageSpacing="@dimen/workspace_page_spacing"
                launcher:pageIndicator="@id/page_indicator">
            </com.android.launcher3.Workspace>
    修改位置(默认显示第三页)

    packages/apps/Launcher3/res/values/config.xml

    -    <integer name="config_workspaceDefaultScreen">0</integer>
    +    <integer name="config_workspaceDefaultScreen">2</integer>


  • 相关阅读:
    Redis环境搭建(整合SprinigBoot一键切换集群和单机环境)
    Docker + SpringBoot2.0快速构建镜像
    kafka实现分布式事务
    【本地事物】
    【数据结构之二叉树】
    变量
    python 介绍
    编程语言的区别
    路飞学城python教程 第二章练习题
    windows下nginx配合ffmpeg推送视频流
  • 原文地址:https://www.cnblogs.com/chengliu/p/4130623.html
Copyright © 2011-2022 走看看