Can any one help me? I am in help... On 5月3日, 下午4时39分, yidongsoft <[email protected]> wrote: > Widget updated without my invoking and text size and colour settings > lost. > > My widget consists of a TextView. I set the text colour and text size > with > > views.setInt(R.id.widgetText, "setTextColor", > getResources().getColor(textColorResource)); > views.setFloat(R.id.widgetText, "setTextSize", textSize); > > in provider. > > configure xml file is: > <?xml version="1.0" encoding="utf-8"?> > <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/ > android" > android:updatePeriodMillis="0" android:minWidth="294dp" > android:minHeight="294dp" android:configure="com.abc.WidgetOperator" > android:initialLayout="@layout/widget_normal"> > </appwidget-provider> > > Note: updatePeriod is 0, no automatic update. > > But the widget itself updates erratically. I set a tag in the > broadcast receiver and know that the widget is not updated via the > widget provider. It seems that the widget application (of android > system) updates the widget without loading the text colour and size. > After some time or some action (for example sending a shortcut to > desktop. Sometimes this sending action causes the widget lose the text > size and colour, sometimes does nothing to the widget.) That's the > worst thing. It's updated, but the text size and colour is set to the > initialLayout. This make my widget text size and colour nosense. > > Any one can help me? Thanks! > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

