Permalink
Browse files

! fixed widget not updating on phones!

* added some more strings for translation
  • Loading branch information...
artiomchi committed Jul 4, 2012
1 parent 593655a commit 9b4a2e0b13bc94cb723b8b4e07cfe8b81f865afa
View
@@ -50,8 +50,8 @@
<item>Default.90deg</item>
</string-array>
<string-array name="theme_labels">
- <item>Default</item>
- <item>Default Sideways</item>
+ <item>@string/theme_default</item>
+ <item>@string/theme_default_sideways</item>
</string-array>
<integer-array name="defaultDaysTab_values">
<item>3</item>
View
@@ -140,4 +140,7 @@
<string name="donation_paypal">Go to PayPal</string>
<string name="alert_just_swapped">IMPORTANT! With this version we have switched the default order of the icons in the widget (you can change it back in the widget settings). The dock battery will now be the on the left, and the main battery on the right side, to reflect the changes in the new Asus updates!</string>
+
+ <string name="theme_default">Default</string>
+ <string name="theme_default_sideways">Default Sideways</string>
</resources>
@@ -38,12 +38,14 @@ public static void updateAllWidgets(Context context, BatteryLevel level, int[] w
AppWidgetManager manager = AppWidgetManager.getInstance(context);
if (widgets == null) {
int[] widgets1 = manager.getAppWidgetIds(new ComponentName(context, BatteryWidget.class));
- int[] widgets2 = manager.getAppWidgetIds(new ComponentName(context, BatteryWidget2x2.class));
- int[] widgets3 = manager.getAppWidgetIds(new ComponentName(context, BatteryWidget3x4.class));
+ int[] widgets2 = manager.getAppWidgetIds(new ComponentName(context, BatteryWidget1x1.class));
+ int[] widgets3 = manager.getAppWidgetIds(new ComponentName(context, BatteryWidget2x2.class));
+ int[] widgets4 = manager.getAppWidgetIds(new ComponentName(context, BatteryWidget3x4.class));
widgets = new int[widgets1.length + widgets2.length + widgets3.length];
System.arraycopy(widgets1, 0, widgets, 0, widgets1.length);
System.arraycopy(widgets2, 0, widgets, widgets1.length, widgets2.length);
System.arraycopy(widgets3, 0, widgets, widgets1.length + widgets2.length, widgets3.length);
+ System.arraycopy(widgets4, 0, widgets, widgets1.length + widgets2.length + widgets3.length, widgets4.length);
}
for (int widgetId : widgets) {

0 comments on commit 9b4a2e0

Please sign in to comment.