首先,桌面有不少图标,这样子很乱,不喜欢
目标设计和7.1一样即可,简洁
于是开始设计
1.首先先把google搜索栏去掉
\sdk\packages\apps\Launcher3\res\layout\search_container_workspace.xml
<?xml version="1.0" encoding="utf-8"?><!--Copyright (C) The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.--><com.android.launcher3.qsb.QsbContainerViewxmlns:android="/apk/res/android"android:orientation="vertical"android:layout_width="match_parent"android:layout_height="0dp"android:id="@id/search_container_workspace"android:padding="0dp" >+ <!--<fragmentandroid:name="com.android.launcher3.qsb.QsbContainerView$QsbFragment"android:layout_width="match_parent"android:tag="qsb_view"android:layout_height="match_parent"/>+ --></com.android.launcher3.qsb.QsbContainerView>
屏蔽掉google搜索栏
2.去掉桌面图标
\sdk\packages\apps\Launcher3\res\xml\dw_tablet_hotseat.xml
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.--><favorites xmlns:launcher="/apk/res-auto/com.android.launcher3"><!-- Hotseat (We use the screen as the position of the item in the hotseat) --><!-- Messaging, Email, Browser, [All Apps], Music, Gallery, Camera --><resolvelauncher:container="-101"launcher:screen="0"launcher:x="0"launcher:y="0" ><favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MESSAGING;end" /><favorite launcher:uri="sms:" /><favorite launcher:uri="smsto:" /><favorite launcher:uri="mms:" /><favorite launcher:uri="mmsto:" /></resolve>+ <!--<resolvelauncher:container="-101"launcher:screen="1"launcher:x="1"launcher:y="0" ><favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_EMAIL;end" /><favorite launcher:uri="mailto:" /></resolve><resolvelauncher:container="-101"launcher:screen="2"launcher:x="2"launcher:y="0" ><favoritelauncher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_BROWSER;end" /><favorite launcher:uri="/" /></resolve>+ --><!-- All Apps -->+ <!--<favoritelauncher:container="-101"launcher:screen="4"launcher:x="4"launcher:y="0"launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MUSIC;end" /><resolvelauncher:container="-101"launcher:screen="5"launcher:x="5"launcher:y="0" ><favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_GALLERY;end" /><favorite launcher:uri="#Intent;type=images/*;end" /></resolve><resolvelauncher:container="-101"launcher:screen="6"launcher:x="6"launcher:y="0" ><favorite launcher:uri="#Intent;action=android.media.action.STILL_IMAGE_CAMERA;end" /><favorite launcher:uri="#Intent;action=android.intent.action.CAMERA_BUTTON;end" /></resolve>+ --></favorites>
桌面干净了之后
3.放上我们想要的设置图标居中
\sdk\packages\apps\Launcher3\res\xml\default_workspace_5x6.xml
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.--><favorites xmlns:launcher="/apk/res-auto/com.android.launcher3"><!-- Hotseat --><include launcher:workspace="@xml/dw_tablet_hotseat" /><!-- Bottom row -->+<favorite+ launcher:packageName="com.android.settings"+ launcher:className="com.android.settings.Settings"+ launcher:screen="0"+ launcher:x="3"+ launcher:y="4" />++ <!-- <favoritelauncher:screen="0"launcher:x="0"launcher:y="-1"launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_CONTACTS;end" /><resolvelauncher:screen="0"launcher:x="-1"launcher:y="-1" ><favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MARKET;end" /><favorite launcher:uri="market://details?id=com.android.launcher" /></resolve>+ --></favorites>