Launcher横屏的修改方法
2011-04-28 09:41
323 查看
一些产品在横屏使用时,也希望hotseat在屏幕的下方。一个朋友问具体是怎么做的。我现在把我目前做的写在下面,希望对要做这件事的人有所帮助。
diff -r res//layout-land/launcher.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//layout-land/launcher.xml
< android:layout_height="fill_parent"
< android:layout_width="@dimen/button_bar_height_portrait"
< android:layout_gravity="right|center_vertical"
---
> android:layout_height="@dimen/button_bar_height"
> android:layout_width="fill_parent"
> android:layout_gravity="bottom|center_horizontal"
< launcher:direction="vertical"
---
> launcher:direction="horizontal"
>
> <ImageView
> android:id="@+id/hotseat_left1"
> style="@style/HotseatButton"
> android:layout_toLeftOf="@id/all_apps_button"
> android:src="@drawable/hotseat_phone"
> android:onClick="launchHotSeat"
> />
>
> <ImageView //我扩展了一些 hotseat 。 只留了一个当例子。
> android:id="@+id/hotseat_left"
> style="@style/HotseatButton.Left"
> android:layout_toLeftOf="@id/hotseat_left1"
> android:src="@drawable/hotseat_namecard"
> android:onClick="launchHotSeat"
> />
>
> <ImageView
> android:id="@+id/hotseat_right1"
> style="@style/HotseatButton"
> android:layout_toRightOf="@id/all_apps_button"
>
> android:src="@drawable/hotseat_call_log"
>
> android:onClick="launchHotSeat"
diff -r res//layout-land/workspace_screen.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//layout-land/workspace_screen.xml
27,32c27,32
< launcher:longAxisStartPadding="65dip"
< launcher:longAxisEndPadding="65dip"
< launcher:shortAxisStartPadding="0dip"
< launcher:shortAxisEndPadding="0dip"
< launcher:shortAxisCells="4"
< launcher:longAxisCells="4" />
---
> launcher:longAxisStartPadding="6dip" // 这个可以任意调整
> launcher:longAxisEndPadding="6dip"
> launcher:shortAxisStartPadding="1dip"
> launcher:shortAxisEndPadding="1dip"
> launcher:shortAxisCells="6"
> launcher:longAxisCells="6" />
diff -r res//values/arrays.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//values/arrays.xml
3a4
> <item>intent:#Intent;action=com.android.contacts.action.LIST_CONTACTS;end</item>
5c6,7
< <item>*BROWSER*</item>
---
> <item>intent:#Intent;action=com.android.phone.action.RECENT_CALLS;end</item>
> <item>intent:#Intent;action=com.android.schedule.action.XXXX_SCHEDULE</item> //扩展了hotseat上按键的intent参数
8,9c10,13
< <item>@drawable/hotseat_phone</item>
< <item>@drawable/hotseat_browser</item>
---
> <item>@drawable/hotseat_namecard</item> // Launcher启动后,Launcher.java还要重新初始化界面。
> <item>@drawable/hotseat_inner_phone</item>
> <item>@drawable/hotseat_call_log</item>
> <item>@drawable/hotseat_schedule</item>
diff -r res//values-land/styles.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//values-land/styles.xml
22,23c22,23
< <item name="android:paddingTop">12dip</item>
< <item name="android:paddingBottom">12dip</item>
---
> <item name="android:paddingTop">2dip</item>
> <item name="android:paddingBottom">2dip</item>
25,26c25,26
< <item name="android:layout_height">wrap_content</item> //这就是那个朋友问的问题。
< <item name="android:layout_width">fill_parent</item>
---
> <item name="android:layout_height">fill_parent</item>
> <item name="android:layout_width">wrap_content</item>
32c32
< <item name="android:layout_marginBottom">4dip</item>
---
> <item name="android:layout_marginBottom">0dip</item>
36c36
< <item name="android:layout_marginTop">4dip</item>
---
> <item name="android:layout_marginTop">0dip</item>
diff -r res//xml/default_workspace.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//xml/default_workspace.xml
47,48c47,48
< launcher:packageName="com.android.music"
< launcher:className="com.android.music.MediaAppWidgetProvider"
---
> launcher:packageName="com.android.xxx_calendar.widget"
> launcher:className="com.android.xxx_calendar.widget.Calendar_widget" //希望开机就加载自己的AppWidget。这个还不对,哪个朋友知道原因,请赐教。
diff -r res//layout-land/launcher.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//layout-land/launcher.xml
< android:layout_height="fill_parent"
< android:layout_width="@dimen/button_bar_height_portrait"
< android:layout_gravity="right|center_vertical"
---
> android:layout_height="@dimen/button_bar_height"
> android:layout_width="fill_parent"
> android:layout_gravity="bottom|center_horizontal"
< launcher:direction="vertical"
---
> launcher:direction="horizontal"
>
> <ImageView
> android:id="@+id/hotseat_left1"
> style="@style/HotseatButton"
> android:layout_toLeftOf="@id/all_apps_button"
> android:src="@drawable/hotseat_phone"
> android:onClick="launchHotSeat"
> />
>
> <ImageView //我扩展了一些 hotseat 。 只留了一个当例子。
> android:id="@+id/hotseat_left"
> style="@style/HotseatButton.Left"
> android:layout_toLeftOf="@id/hotseat_left1"
> android:src="@drawable/hotseat_namecard"
> android:onClick="launchHotSeat"
> />
>
> <ImageView
> android:id="@+id/hotseat_right1"
> style="@style/HotseatButton"
> android:layout_toRightOf="@id/all_apps_button"
>
> android:src="@drawable/hotseat_call_log"
>
> android:onClick="launchHotSeat"
diff -r res//layout-land/workspace_screen.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//layout-land/workspace_screen.xml
27,32c27,32
< launcher:longAxisStartPadding="65dip"
< launcher:longAxisEndPadding="65dip"
< launcher:shortAxisStartPadding="0dip"
< launcher:shortAxisEndPadding="0dip"
< launcher:shortAxisCells="4"
< launcher:longAxisCells="4" />
---
> launcher:longAxisStartPadding="6dip" // 这个可以任意调整
> launcher:longAxisEndPadding="6dip"
> launcher:shortAxisStartPadding="1dip"
> launcher:shortAxisEndPadding="1dip"
> launcher:shortAxisCells="6"
> launcher:longAxisCells="6" />
diff -r res//values/arrays.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//values/arrays.xml
3a4
> <item>intent:#Intent;action=com.android.contacts.action.LIST_CONTACTS;end</item>
5c6,7
< <item>*BROWSER*</item>
---
> <item>intent:#Intent;action=com.android.phone.action.RECENT_CALLS;end</item>
> <item>intent:#Intent;action=com.android.schedule.action.XXXX_SCHEDULE</item> //扩展了hotseat上按键的intent参数
8,9c10,13
< <item>@drawable/hotseat_phone</item>
< <item>@drawable/hotseat_browser</item>
---
> <item>@drawable/hotseat_namecard</item> // Launcher启动后,Launcher.java还要重新初始化界面。
> <item>@drawable/hotseat_inner_phone</item>
> <item>@drawable/hotseat_call_log</item>
> <item>@drawable/hotseat_schedule</item>
diff -r res//values-land/styles.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//values-land/styles.xml
22,23c22,23
< <item name="android:paddingTop">12dip</item>
< <item name="android:paddingBottom">12dip</item>
---
> <item name="android:paddingTop">2dip</item>
> <item name="android:paddingBottom">2dip</item>
25,26c25,26
< <item name="android:layout_height">wrap_content</item> //这就是那个朋友问的问题。
< <item name="android:layout_width">fill_parent</item>
---
> <item name="android:layout_height">fill_parent</item>
> <item name="android:layout_width">wrap_content</item>
32c32
< <item name="android:layout_marginBottom">4dip</item>
---
> <item name="android:layout_marginBottom">0dip</item>
36c36
< <item name="android:layout_marginTop">4dip</item>
---
> <item name="android:layout_marginTop">0dip</item>
diff -r res//xml/default_workspace.xml /home/hu/原始的代码/Gingerbread/packages/apps/Launcher2/res//xml/default_workspace.xml
47,48c47,48
< launcher:packageName="com.android.music"
< launcher:className="com.android.music.MediaAppWidgetProvider"
---
> launcher:packageName="com.android.xxx_calendar.widget"
> launcher:className="com.android.xxx_calendar.widget.Calendar_widget" //希望开机就加载自己的AppWidget。这个还不对,哪个朋友知道原因,请赐教。
相关文章推荐
- 修改Launcher3的Hotseat的位置到右侧的方法
- android4.4 Launcher3 修改配置文件default_workspace.xml无效的解决方法
- Android开发实现Launcher3应用列表修改透明背景的方法
- android4.4 Launcher3 修改配置文件default_workspace.xml无效的解决方法
- android 修改launcher行数和列数的方法
- Android开发中Launcher3常见默认配置修改方法总结
- ubuntu和windows下几种不同的修改Launcher的方法
- cocos2d 屏幕默认是横屏,修改为竖屏 的方法
- Android 5.0 开机横屏修改方法
- ubuntu和windows下几种不同的修改Launcher的方法
- 禁止修改输入框的方法 Javascript强制设为首页的网页代码
- Eclipse中修改SVN用户名和密码方法
- 修改Eclipse中package explore字体的方法
- sqlserver 2008手工修改表结构,表不能保存的问题与解决方法
- 修改/etc/profile后,想让起立即生效的方法
- 修改PHP上传文件大小限制的方法
- linux下修改root密码以及找回密码的方法
- Apache 修改端口 默认路径配置修改方法
- 手动修改Linux IP的方法小结
- PJ Blog修改-禁止复制的代码和方法