/*
 * Copyright 2015 Łukasz Kieś
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 */

package com.kiesiu.mypassgenwidget;

import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;


public class AppWidget extends AppWidgetProvider {

    @Override
    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
    }

    @Override
    public void onEnabled(Context context) {
    }

    @Override
    public void onDisabled(Context context) {
    }
}

@@ -25,16 +25,37 @@
 asz Kie%C5%9B
+ %3Ckiesiu@kiesiu.com%3E.
 %0A *%0A * L
@@ -116,16 +116,19 @@
 cense%22);
+%0A *
  you may
@@ -184,16 +184,19 @@
 License.
+%0A *
  You may
@@ -227,16 +227,23 @@
 cense at
+%0A *    
  http://
@@ -351,16 +351,19 @@
 software
+%0A *
  distrib
@@ -420,16 +420,19 @@
 %22 BASIS,
+%0A *
  WITHOUT
@@ -496,16 +496,19 @@
 implied.
+%0A *
  See the
@@ -567,16 +567,19 @@
 ions and
+%0A *
  limitat
@@ -763,16 +763,51 @@
 ontext;%0A
+import android.widget.RemoteViews;%0A
 %0A%0Apublic
@@ -961,24 +961,150 @@
 idgetIds) %7B%0A
+        for (int appWidgetId : appWidgetIds) %7B%0A            updateAppWidget(context, appWidgetManager, appWidgetId);%0A        %7D%0A
     %7D%0A%0A    @
@@ -1229,11 +1229,307 @@
  %7B%0A    %7D
+%0A%0A    static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,%0A                                int appWidgetId) %7B%0A        RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.app_widget);%0A        appWidgetManager.updateAppWidget(appWidgetId, views);%0A    %7D
 %0A%7D%0A

Update RemoteViews in AppWidget.