Android:主屏幕
我目前正在开发一个简单的 Android HomeScreen
,只有 1 页。 我想知道如何使我的 HomeScreen
运行并显示 这个免费小部件。
非常感谢!
I'm currently developing a simple android HomeScreen
with just 1 page.
I would like to know how to enable my HomeScreen
to run and display widgets like this free widget.
Thanks so much in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用它的最好方法是获取 Launcher 应用程序的源代码,并了解 AppWidgetHost 如何添加到视图层次结构以及它如何维护 AppWidgetHostView 实例。
您可以在此处获取启动器源:
Laucnher.git
The best way you can use it, just get sources of Launcher application and find how AppWidgetHost added to view hierarchy and how it is maintaining AppWidgetHostView instances.
Launcher sources you can get here:
Laucnher.git
主屏幕小部件由用户根据他们拥有的可用空间以及他们希望将小部件放置在主屏幕中的位置来添加。作为开发人员,您只能提供一个小部件,但将其添加到主屏幕完全由用户控制。
The home screen widgets are added by users based on the free-space they have and where they want the widget to be placed in their home-screen. As a developer you can only provide a widget, but adding that to the home-screen is purely in the control of the user.