如何在Android的主屏幕上添加一个按钮? [英] how to Add a Button on the home screen in android?

查看:288
本文介绍了如何在Android的主屏幕上添加一个按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要添加主屏幕上的按钮,并希望在该按钮的单击事件code。
我有有一个激活按钮的应用程序,只要此激活按钮被点击我想,一个按钮被主屏幕上创建的,我想code在其Click event.I一些数据库查询已经创建了应用程序,现在我想放置该按钮上家screen.How做呢。

I want to add a button on the home screen and want to code in the click event of that button. I have an application which has an activate button,As soon as this activate button is clicked i want that a Button gets created on the home screen and i want to code some database queries in its click event.I have already created that application,Now i want to place the button on the home screen.How do i do that.

谢谢预测。

推荐答案

我不认为你可以通过编码创建的即时主屏幕按钮。在我的书,以获得有关主屏幕按钮的唯一方法是,如果用户将它作为一个小部件。

I don't think you can create a button on the Home Screen on-the-fly by coding. In my book, the only way to get a button on the Home Screen is if the user adds it as a widget.

这篇关于如何在Android的主屏幕上添加一个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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