是否有可能以编程方式设置,并从主屏幕在Android中移除的Widget ..? [英] Is it possible to Programatically Set and Remove Widget from the home screen in Android..?

查看:163
本文介绍了是否有可能以编程方式设置,并从主屏幕在Android中移除的Widget ..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PLZ看到下面的问题,

Plz see the problem below,

我有一个Android应用程序的Widget功能,一切工作正常,但安装我的应用程序后,我需要手动小部件设置为从部件部分主屏幕。现在,我想通过我的应用程序做到这一点(即我打算给一个复选框,在我的应用程序的设定部分,当用户选中该复选框,控件应该出现在主屏幕上,当用户将未选中状态的复选框,部件应该从屏幕上消失。有没有可能......?)。希望你明白我想说的...?谢谢.. !!!

I have an Android application having Widget functionality, everything is working fine, but After installing my application I manually need to set the widget to the home screen from the widget section. Now I want to do it through my Application (i.e. I'm planning to give One CheckBox, in my application's setting section and when user will Check the CheckBox, Widget should appear to the home screen and when user will UnChecked the CheckBox, Widget should removed from the screen. Is it Possible...? ). Hope You understand what I'm trying to say...? Thanks..!!!

推荐答案

NO 。其不possible..home屏幕小部件添加和删除只能由用户来完成的,但不是programmatic..because部件是主屏幕下,你没有任何权限,添加或从主屏幕中移除。

NO.its not possible..home screen widget adding and removing only done by the user but not programmatic..because widgets are under the home screen you don't have any permission to add it or remove it from home screen..

这篇关于是否有可能以编程方式设置,并从主屏幕在Android中移除的Widget ..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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