简体   繁体   中英

button on homescreen widget

I have an widget with an button (R.id.button) When I click the button, it should open the activity: "openactivity" Do you now I can do this. It's an basic question because I'm new in Android developing.

I hope you understand me, and you could help me.

Gaauwe

Use a PendingIntent, as described in the the android docs here: http://developer.android.com/guide/topics/appwidgets/index.html#AppWidgetProvider

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM