去掉Launcher2的黑边
有没有同学跟我一样,感觉ct或者cb2的桌面太丑,还不如使用Launcher2呢,怎么换成Launcher2,请参考修改默认Launcher,可是换成launcher2了,屏幕上下都有大块黑边,严重影响美观呀,看我给它动点小手术
cd packages/apps/Launcher2diff --git a/packages/apps/Launcher2/res/layout-land/launcher.xml b/packages/apps/Launcher2/res/layout-land/launcher.xml
index 051d8b2..5c81c21 100644
--- a/packages/apps/Launcher2/res/layout-land/launcher.xml
+++ b/packages/apps/Launcher2/res/layout-land/launcher.xml
@@ -22,7 +22,7 @@
android:id="@+id/launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/workspace_bg">
+ >
<com.android.launcher2.DragLayer
android:id="@+id/drag_layer"
@@ -118,4 +118,4 @@
android:layout_height="match_parent"
android:visibility="invisible" />
</com.android.launcher2.DragLayer>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
diff --git a/packages/apps/Launcher2/res/layout-port/launcher.xml b/packages/apps/Launcher2/res/layout-port/launcher.xml
index 445c85e..4afc571 100644
--- a/packages/apps/Launcher2/res/layout-port/launcher.xml
+++ b/packages/apps/Launcher2/res/layout-port/launcher.xml
@@ -22,14 +22,13 @@
android:id="@+id/launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/workspace_bg">
+ >
<com.android.launcher2.DragLayer
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:id="@+id/drag_layer"
- android:background="@drawable/workspace_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
@@ -116,4 +115,4 @@
android:layout_height="match_parent"
android:visibility="invisible" />
<com.android.launcher2.DragLayer
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:id="@+id/drag_layer"
- android:background="@drawable/workspace_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
@@ -116,4 +115,4 @@
android:layout_height="match_parent"
android:visibility="invisible" />
</com.android.launcher2.DragLayer>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
diff --git a/packages/apps/Launcher2/res/layout-sw720dp/launcher.xml b/packages/apps/Launcher2/res/layout-sw720dp/launcher.xml
index 81a8f37..d0f8a6d 100644
--- a/packages/apps/Launcher2/res/layout-sw720dp/launcher.xml
+++ b/packages/apps/Launcher2/res/layout-sw720dp/launcher.xml
@@ -22,14 +22,13 @@
android:id="@+id/launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/workspace_bg">
+ >
<com.android.launcher2.DragLayer
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:id="@+id/drag_layer"
- android:background="@drawable/workspace_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
@@ -117,4 +116,4 @@
android:layout_height="match_parent"
android:visibility="invisible" />
</com.android.launcher2.DragLayer>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
总结下,就是把有渐变的背景去掉,还原成壁纸默认的着色。
修改完成后执行mm命令,在./out/target/product/sugar-cubietruck/system/app/目录下面就会生成Launcher2.apk,执行adb push ***/Launcher2.apk /system/app下面,就会发现黑边不见了。
楼主,图文并茂,岂不妙哉
有图有真相
看了下楼主,是用VGA点的吧,我看了下比例似乎是16:8的,你用logcat看看是不是,看你的VGA好像也铺不满屏
是HDMI点的,VGA是有一点铺不满屏
页:
[1]