Android Open Source - our_days Love Widget Provider






From Project

Back to project page our_days.

License

The source code is released under:

Apache License

If you think the Android project our_days listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.yemyatthu.ourdays.widget;
//from   w w w  . j a v  a  2 s .  co  m
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;
import android.widget.RemoteViews;

import com.yemyatthu.ourdays.R;
import com.yemyatthu.ourdays.activity.MyConfigActivity;

/**
 * Created by YMT on 10/12/2014.
 */
public class LoveWidgetProvider extends AppWidgetProvider {
    @Override
    public void onEnabled(Context context) {
        super.onEnabled(context);
    }

    @Override
    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
        super.onUpdate(context, appWidgetManager, appWidgetIds);
        for(int i = 0;i <appWidgetIds.length;i++){
            int appWidgetId = appWidgetIds[i];
            Intent intent = new Intent(context, MyConfigActivity.class);
            PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);

            RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);
            views.setOnClickPendingIntent(R.id.widget_layout, pendingIntent);
            appWidgetManager.updateAppWidget(appWidgetId, views);


        }
    }

}




Java Source Code List

com.meg7.widget.BaseImageView.java
com.meg7.widget.CircleImageView.java
com.meg7.widget.CustomShapeImageView.java
com.meg7.widget.CustomShapeSquareImageView.java
com.meg7.widget.RectangleImageView.java
com.meg7.widget.SvgImageView.java
com.svgandroid.ParserHelper.java
com.svgandroid.SVGParseException.java
com.svgandroid.SVGParser.java
com.svgandroid.SVG.java
com.yemyatthu.ourdays.activity.MyConfigActivity.java
com.yemyatthu.ourdays.fragment.MyConfigFragment.java
com.yemyatthu.ourdays.widget.LoveWidgetProvider.java