I'm facing a problem again...Even if i make two layouts, the AppWidget
already drawn is not getting redrawn :(
For Ex:

if(0 == calendar.get(Calendar.AM_PM))
   views = new RemoteViews(context.getPackageName(),
R.layout.analog_appwidget_am);
else
 views = new RemoteViews(context.getPackageName(),
R.layout.analog_appwidget_pm);

 int[] appWidgetIds = intent.getIntArrayExtra
(AppWidgetManager.EXTRA_APPWIDGET_IDS);
 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance
(context);
 appWidgetManager.updateAppWidget(appWidgetIds, views);

What should I do now?

On Jun 24, 1:25 pm, Ravi <ravikumar...@gmail.com> wrote:
> Hi Jeff, Thnz for the reply...
> Well, I feel tht there should be AnalogClock Api's to modify it's
> drawables atleast in next SDK version.
> Right now, I'am goin to make use of a single layout & change it's dial
> making use of Remote view's visiblity option.
>
> On Jun 24, 1:13 pm, Jeff Sharkey <jshar...@android.com> wrote:
>
>
>
> > AnalogClock doesn't directly provide methods to change its drawables.
> > One approach you could use would be to have two layout files, one each
> > for AM and PM, and build a new RemoteViews targeting the correct
> > layout when building updates.
>
> > j
>
> > On Tue, Jun 23, 2009 at 9:54 PM, Ravi<ravikumar...@gmail.com> wrote:
>
> > > Using Appwidgets, If we use TextView in layout provider xml then, we
> > > are able to set the text in Provider.java using
> > > remoteViews.setTextViewText() method.
>
> > > Similarly, if I use AnalogClock as AppWidget in xml then, is there any
> > > method available to change the android:dial value using RemoteViews or
> > > AnalogClock api's in Provider.java ?
>
> > > For Ex- I need to load two dial png's based on AM or PM.
>
> > > Please help me.
>
> > --
> > Jeff Sharkey
> > jshar...@android.com- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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