
Intent intent = new Intent(context,ExampleActivity.class);PendingIntent pendingIntent = PendingIntent.getActivity(context,intent,0);// Get the layout for the App Widget and attach an on-click Listener to the buttonRemoteVIEws vIEws = new RemoteVIEws(context.getPackagename(),R.layout.appWidget_provIDer_layout);vIEws.setonClickPendingIntent(R.ID.button,pendingIntent);
看一下这个
Processing more than one button click at Android Widget
总结以上是内存溢出为你收集整理的如何从android中的小部件打开应用程序?全部内容,希望文章能够帮你解决如何从android中的小部件打开应用程序?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)