添加小部件从Android应用程序到主屏幕 [英] Add widget to homescreen from Android application

查看:396
本文介绍了添加小部件从Android应用程序到主屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现这里的例子:<一href="http://stackoverflow.com/questions/10113645/android-intent-that-open-widget-context-menu">Android - 意图打开窗口小部件的上下文菜单在这里: HTTP://$c$crend​​er.blogspot。 COM /

第一个启动窗口小部件选择器,但进入它消失,当你选择任何内容。第二个让你选择一个小部件,但它显示了在应用程序中查看。有没有一种方法调用从一个按钮控件中选择一个应用程序,但仍然有手机的主屏幕是AppWidgetHost?

这可能是我misinter preting的事情,但在我看来像AppWidgetHost必须有你的地方调用控件选择菜单中的应用程序。

解决方案
  

有没有一种方法调用从一个按钮控件中选择一个应用程序,但仍然有手机的主屏幕是AppWidgetHost?

只有当你的主屏幕。

  

这可能是我misinter preting的事情,但在我看来像AppWidgetHost必须有你的地方调用控件选择菜单中的应用程序。

更重要的是,它是 AppWidgetHost 必须做的工作,以利用选择的。

I have found examples here: Android - Intent that open widget context menu and here: http://coderender.blogspot.com/.

The first one launches the widget picker, but goes it goes away when you select anything. The second one lets you pick a widget, but it shows it in the application view. Is there a way to call the widget selection from a button in an app but still have the main screen on the phone be the AppWidgetHost?

It may be me misinterpreting things, but it looks to me like the AppWidgetHost has to be the application where you are calling the widget selection menu.

解决方案

Is there a way to call the widget selection from a button in an app but still have the main screen on the phone be the AppWidgetHost?

Only if you are the home screen.

It may be me misinterpreting things, but it looks to me like the AppWidgetHost has to be the application where you are calling the widget selection menu.

More importantly, it is the AppWidgetHost that must do the work to make use of the selection.

这篇关于添加小部件从Android应用程序到主屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆