From 41f9808f3f3c8f13fab1ac80da1fc83a60ee6405 Mon Sep 17 00:00:00 2001 From: Stefan Niedermann Date: Thu, 8 Oct 2015 15:17:12 +0200 Subject: [PATCH] Fix ArrayIndexOutOfBoundsException --- .../owncloud/notes/android/widget/SingleNoteWidget.java | 2 +- app/src/main/res/layout/widget_single_note.xml | 2 +- app/src/main/res/values/colors.xml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/it/niedermann/owncloud/notes/android/widget/SingleNoteWidget.java b/app/src/main/java/it/niedermann/owncloud/notes/android/widget/SingleNoteWidget.java index 22ebb471..0413bdf3 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/android/widget/SingleNoteWidget.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/android/widget/SingleNoteWidget.java @@ -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); diff --git a/app/src/main/res/layout/widget_single_note.xml b/app/src/main/res/layout/widget_single_note.xml index c9b4769e..9f1ecc81 100644 --- a/app/src/main/res/layout/widget_single_note.xml +++ b/app/src/main/res/layout/widget_single_note.xml @@ -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" /> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index b0fbfe3b..bfc37b35 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -5,6 +5,7 @@ #1d2d44 #112233 + #99f3f3f3 #f3f3f3 #ffffff #000000