7.1.1 Launcher3 默认桌面应用奇特点
上次说了添加默认桌面应用
其他说明screen,x,y 画的图今天发现有个奇怪现象
原说明图
添加默认桌面应用传送点http://blog.csdn.net/yxdspirit/article/details/78492487
//先看代码
<resolve
launcher:container="-100"
launcher:screen="0"
launcher:x="0"
launcher:y="-3" >
<favorite
launcher:className="com.android.dialer.DialtactsActivity"
launcher:packageName="com.android.dialer" />
</resolve>
<resolve
launcher:container="-100"
launcher:screen="0"
launcher:x="1"
launcher:y="-2" >
<favorite
launcher:className="com.android.dialer.DialtactsActivity"
launcher:packageName="com.android.dialer" />
</resolve>
<resolve
launcher:container="-100"
launcher:screen="0"
launcher:x="1"
launcher:y="-1" >
<favorite
launcher:className="com.android.dialer.DialtactsActivity"
launcher:packageName="com.android.dialer" />
</resolve>
<resolve
launcher:container="-100"
launcher:screen="0"
launcher:x="0"
launcher:y="-1" >
<favorite
launcher:className="com.android.dialer.DialtactsActivity"
launcher:packageName="com.android.dialer" />
</resolve>
按照上次的想法的话 图标应该是这样的
实际显示也确实是这样
这样的话用坐标轴表示的话很奇怪
今天偶然看了下launcher的数据库
发现存储的x,y是这样的
所以我改了下代码
<resolve
launcher:container="-100"
launcher:screen="0"
launcher:x="0"
launcher:y="0" >
<favorite
launcher:className="com.android.dialer.DialtactsActivity"
launcher:packageName="com.android.dialer" />
</resolve>
<resolve
launcher:container="-100"
launcher:screen="0"
launcher:x="1"
launcher:y="1" >
<favorite
launcher:className="com.android.dialer.DialtactsActivity"
launcher:packageName="com.android.dialer" />
</resolve>
<resolve
launcher:container="-100"
launcher:screen="0"
launcher:x="1"
launcher:y="2" >
<favorite
launcher:className="com.android.dialer.DialtactsActivity"
launcher:packageName="com.android.dialer" />
</resolve>
<resolve
launcher:container="-100"
launcher:screen="0"
launcher:x="0"
launcher:y="2" >
<favorite
launcher:className="com.android.dialer.DialtactsActivity"
launcher:packageName="com.android.dialer" />
</resolve>
发现结果是一样的,也是这样
这样的话用坐标轴表示的话就是这样了
具体的处理方法,估计得看源码了