Fix ArrayIndexOutOfBoundsException

This commit is contained in:
Stefan Niedermann 2015-10-08 15:17:12 +02:00
parent 723f843f2f
commit 41f9808f3f
3 changed files with 3 additions and 2 deletions

View file

@ -39,7 +39,7 @@ public class SingleNoteWidget extends AppWidgetProvider {
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
for (int i : appWidgetIds) {
for (int i = 0; i < appWidgetIds.length; i++) {
int appWidgetId = appWidgetIds[i];
Log.v("SingleNoteWidget", "onUpdate appWidgetId: " + appWidgetId);
updateAppWidget(null, context, appWidgetManager, appWidgetId);

View file

@ -8,7 +8,7 @@
android:id="@+id/singleNoteContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_highlighted"
android:background="@color/bg_transparent"
android:padding="10dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/fg_default" />

View file

@ -5,6 +5,7 @@
<color name="primary">#1d2d44</color>
<color name="primary_dark">#112233</color>
<color name="bg_transparent">#99f3f3f3</color>
<color name="bg_highlighted">#f3f3f3</color>
<color name="bg_normal">#ffffff</color>
<color name="fg_default">#000000</color>