In Nexus one Widget gets properly updated even after application
update, issue fixed 2.2 version. In 2.1 devices widget still shows
wrong title, even after modifying the layout in updated apk file. Is
there any work around for 2.1 devices?

Please suggest.



On Jul 29, 4:24 pm, Subba <raochoud...@gmail.com> wrote:
> Kostya,
>
> updateMessageCount does based on count it basically hides the count
> container view, if count > 0 it displays the count.
>
> In the first post i mentioned updateMessageCount signature wrong. Here
> is the code.
>
>      updateMessageCount( Context context, int count, RemoteViews
> views)
>         {
>
>            if( count > 0 )
>            {
>                 String text = ""+count;
>                 views.setViewVisibility(R.id.counter_container,View.VISIBLE);
>                 views.setTextViewText(R.id.counter_text, text);
>            }else
>            {
>              views.setViewVisibility(R.id.counter_container,View.INVISIBLE);
>            }
>
>         }
>
>       In the updated version apk file i try to set the application
> title in count > 0 loop, it throws the  android.widget.RemoteViews
> $ActionException: can't find view: 0x7f0b004e. Below is the stack
> trace
>
>           if( count > 0 )
>            {
>                 String text = ""+count;
>                 views.setViewVisibility(R.id.counter_container,View.VISIBLE);
>                 views.setTextViewText(R.id.app_name_text, "testapp");
>                 views.setTextViewText(R.id.counter_text, text);
>            }
>
> W/AppWidgetHostView(  185): updateAppWidget couldn't find any view,
> using error view
> W/AppWidgetHostView(  185): android.widget.RemoteViews
> $ActionException: can't find view: 0x7f0b004e
> W/AppWidgetHostView(  185):     at android.widget.RemoteViews
> $ReflectionAction.apply(RemoteViews.java:427)
> W/AppWidgetHostView(  185):     at
> android.widget.RemoteViews.performApply(RemoteViews.java:925)
> W/AppWidgetHostView(  185):     at
> android.widget.RemoteViews.apply(RemoteViews.java:902)
> W/AppWidgetHostView(  185):     at
> android.appwidget.AppWidgetHostView.updateAppWidget(AppWidgetHostView.java:
> 208)
> W/AppWidgetHostView(  185):     at
> com.htc.launcher.LauncherAppWidgetHostView.updateAppWidget(LauncherAppWidgetHostView.java:
> 116)
> W/AppWidgetHostView(  185):     at
> android.appwidget.AppWidgetHost.updateAppWidgetView(AppWidgetHost.java:
> 243)
> W/AppWidgetHostView(  185):     at android.appwidget.AppWidgetHost
> $UpdateHandler.handleMessage(AppWidgetHost.java:72)
> W/AppWidgetHostView(  185):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> W/AppWidgetHostView(  185):     at android.os.Looper.loop(Looper.java:
> 123)
> W/AppWidgetHostView(  185):     at
> android.app.ActivityThread.main(ActivityThread.java:4595)
> W/AppWidgetHostView(  185):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> W/AppWidgetHostView(  185):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> W/AppWidgetHostView(  185):     at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:860)
> W/AppWidgetHostView(  185):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
> W/AppWidgetHostView(  185):     at dalvik.system.NativeStart.main(Native
> Method)
>
> On Jul 29, 3:58 pm, Kostya Vasilyev <kmans...@gmail.com> wrote:
>
> > What does updateMessageCount do? Post simplified source.
>
> > --
> > Kostya Vasilyev --http://kmansoft.wordpress.com
>
> > 30.07.2010 2:48 пользователь "Subba" <raochoud...@gmail.com> написал:
>
> > Any help or suggestions?
>
> > On Jul 28, 6:28 pm, Subba <raochoud...@gmail.com> wrote:> Application 
> > haswidgetwhich basically shows the number of new message
> > > count in thewidget.Widgethas title and Count.When application gets
> > > updated,widgettitle gets replaced with message count, and some times
> > > it shows problem loadingwidget. seems like R value not updated after
> > > app update. However user removes the application or reboot the
>
> > phonewidgeticon shows properly. Is there any way to fix the issue?
>
> > > Any suggestions.Here is the sample code
>
> > >  public void onReceive(Context context, Intent inten...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to