CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 6337|回复: 4

去掉Launcher2的黑边

[复制链接]
发表于 2014-10-17 12:14:19 | 显示全部楼层 |阅读模式
有没有同学跟我一样,感觉ct或者cb2的桌面太丑,还不如使用Launcher2呢,
怎么换成Launcher2,请参考修改默认Launcher,可是换成launcher2了,屏幕上下都有大块黑边,严重影响美观呀,看我给它动点小手术
cd packages/apps/Launcher2
  1. diff --git a/packages/apps/Launcher2/res/layout-land/launcher.xml b/packages/apps/Launcher2/res/layout-land/launcher.xml
  2. index 051d8b2..5c81c21 100644
  3. --- a/packages/apps/Launcher2/res/layout-land/launcher.xml
  4. +++ b/packages/apps/Launcher2/res/layout-land/launcher.xml
  5. @@ -22,7 +22,7 @@
  6.      android:id="@+id/launcher"
  7.      android:layout_width="match_parent"
  8.      android:layout_height="match_parent"
  9. -    android:background="@drawable/workspace_bg">
  10. +    >

  11.      <com.android.launcher2.DragLayer
  12.          android:id="@+id/drag_layer"
  13. @@ -118,4 +118,4 @@
  14.              android:layout_height="match_parent"
  15.              android:visibility="invisible" />
  16.      </com.android.launcher2.DragLayer>
  17. -</FrameLayout>
  18. \ No newline at end of file
  19. +</FrameLayout>
  20. diff --git a/packages/apps/Launcher2/res/layout-port/launcher.xml b/packages/apps/Launcher2/res/layout-port/launcher.xml
  21. index 445c85e..4afc571 100644
  22. --- a/packages/apps/Launcher2/res/layout-port/launcher.xml
  23. +++ b/packages/apps/Launcher2/res/layout-port/launcher.xml
  24. @@ -22,14 +22,13 @@
  25.      android:id="@+id/launcher"
  26.      android:layout_width="match_parent"
  27.      android:layout_height="match_parent"
  28. -    android:background="@drawable/workspace_bg">
  29. +    >

  30.      <com.android.launcher2.DragLayer
  31.          xmlns:android="http://schemas.android.com/apk/res/android"
  32.          xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"

  33.          android:id="@+id/drag_layer"
  34. -        android:background="@drawable/workspace_bg"
  35.          android:layout_width="match_parent"
  36.          android:layout_height="match_parent"
  37.          android:fitsSystemWindows="true">
  38. @@ -116,4 +115,4 @@
  39.              android:layout_height="match_parent"
  40.              android:visibility="invisible" />
  41.      <com.android.launcher2.DragLayer
  42.          xmlns:android="http://schemas.android.com/apk/res/android"
  43.          xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"

  44.          android:id="@+id/drag_layer"
  45. -        android:background="@drawable/workspace_bg"
  46.          android:layout_width="match_parent"
  47.          android:layout_height="match_parent"
  48.          android:fitsSystemWindows="true">
  49. @@ -116,4 +115,4 @@
  50.              android:layout_height="match_parent"
  51.              android:visibility="invisible" />
  52.      </com.android.launcher2.DragLayer>
  53. -</FrameLayout>
  54. \ No newline at end of file
  55. +</FrameLayout>
  56. diff --git a/packages/apps/Launcher2/res/layout-sw720dp/launcher.xml b/packages/apps/Launcher2/res/layout-sw720dp/launcher.xml
  57. index 81a8f37..d0f8a6d 100644
  58. --- a/packages/apps/Launcher2/res/layout-sw720dp/launcher.xml
  59. +++ b/packages/apps/Launcher2/res/layout-sw720dp/launcher.xml
  60. @@ -22,14 +22,13 @@
  61.      android:id="@+id/launcher"
  62.      android:layout_width="match_parent"
  63.      android:layout_height="match_parent"
  64. -    android:background="@drawable/workspace_bg">
  65. +    >

  66.      <com.android.launcher2.DragLayer
  67.          xmlns:android="http://schemas.android.com/apk/res/android"
  68.          xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"

  69.          android:id="@+id/drag_layer"
  70. -        android:background="@drawable/workspace_bg"
  71.          android:layout_width="match_parent"
  72.          android:layout_height="match_parent"
  73.          android:fitsSystemWindows="true">
  74. @@ -117,4 +116,4 @@
  75.              android:layout_height="match_parent"
  76.              android:visibility="invisible" />
  77.      </com.android.launcher2.DragLayer>
  78. -</FrameLayout>
  79. \ No newline at end of file
  80. +</FrameLayout>
复制代码
总结下,就是把有渐变的背景去掉,还原成壁纸默认的着色。
修改完成后执行mm命令,在./out/target/product/sugar-cubietruck/system/app/目录下面就会生成Launcher2.apk,执行adb push ***/Launcher2.apk /system/app下面,就会发现黑边不见了。
回复

使用道具 举报

发表于 2014-10-17 17:42:52 | 显示全部楼层
楼主,图文并茂,岂不妙哉
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-10-18 10:17:14 | 显示全部楼层
有图有真相

有黑边的图

有黑边的图

改过之后的

改过之后的
回复 支持 反对

使用道具 举报

发表于 2014-11-5 11:00:40 | 显示全部楼层
看了下楼主,是用VGA点的吧,我看了下比例似乎是16:8的,你用logcat看看是不是,看你的VGA好像也铺不满屏
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-11-7 09:23:28 | 显示全部楼层
是HDMI点的,VGA是有一点铺不满屏
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-4-27 05:27 , Processed in 0.024363 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部