Launcher3-dev / Launcher3

This is fork from Launcher3 in AOSP.

Home Page:https://github.com/yuchuangu85/Launcher-master

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

有没有办法用 fragment 自定义负一屏

Goooler opened this issue · comments

如题,看到 Google search 用的是 dialog 进程间通信的方式,有没有办法用 fragment 或者 activity 做,这样可以把其他项目的界面合并到桌面的负一屏,麻烦老哥指点

fragment 可以通过反射加载进来,不过你要添加负一屏的View,这个也比较麻烦,我的Launcher3-mx单层桌面有这个代码。

@yuchuangu85 多谢老哥,我试一下再反馈

fragment 可以通过反射加载进来,不过你要添加负一屏的View,这个也比较麻烦,我的Launcher3-mx单层桌面有这个代码。

老哥,你说的是aidl进程间通信的方式,还是通过addToCustomContentPage添加CellLayout的方式?

想知道通过进程间通信的方式,如何使用Fragment代替View,显示在负一屏。

比如将layout_card.xml中的ImageView换成<fragment 标签,该如何实现?

@xiaoniudonghe2015 addToCustomContentPage方式,跨进程的你要单独写个window处理

@xiaoniudonghe2015 addToCustomContentPage方式,跨进程的你要单独写个window处理

使用跨进程的方案,如何在负一屏window上添加Fragment?

@xiaoniudonghe2015 这个问题需要你自己搜索一下解决方案

@xiaoniudonghe2015 这个问题需要你自己搜索一下解决方案

好的,谢谢