android - Widget click not working after changing device language -


i have simple widget 2 textview, in it's onupdate():

 pendingintent pendingintent =  intentutils.getclockwidgetproviderpendingintent(context);  views.setonclickpendingintent(r.id.timetext, pendingintent); 

works great, when users changes device language can't click on widget anymore (untill rebooting device).

any ideas problem? thanks.

are using updateappwidget invocations somewhere else in code? should invoke setonclickpendingintent before each updateappwidget invocation or can use public void partiallyupdateappwidget (int appwidgetid, remoteviews views) instead because

"note because these updates not cached, state modify not restored restoreinstancestate not persist in case widgets restored using cached version in appwidgetservice."

so every time when user rotate device or change language, widget reseted values keeped in latest updateappwidget invocation.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -