コード例 #1
0
		public override void onUpdate(Context context, SlookCocktailManager cocktailBarManager, int[] cocktailIds)
		{
			// create RemoteViews
			RemoteViews rv = new RemoteViews(context.PackageName, R.layout.feeds_panel_layout);
			string str = context.Resources.getString([email protected]_contents);

			// set text in RemoteViews
			rv.setTextViewText(R.id.text, str + " at " + CurrentDate);

			// update cocktail
			for (int i = 0; i < cocktailIds.Length; i++)
			{
				cocktailBarManager.updateCocktail(cocktailIds[i], rv);
			}
		}
コード例 #2
0
            public virtual void onReceive(Context context, Intent intent)
            {
                string action = intent.Action;

                if (action.Equals(Intent.ACTION_TIME_TICK))
                {
                    outerInstance.Minute;
                    SlookCocktailManager mgr = SlookCocktailManager.getInstance(outerInstance.mContext);
                    int[] cocktailIds        = mgr.getCocktailIds(new ComponentName(context, typeof(CocktailListAdapterProvider)));
                    for (int i = 0; i < cocktailIds.Length; i++)
                    {
                        mgr.notifyCocktailViewDataChanged(cocktailIds[i], R.id.widgetlist);
                    }
                }
            }
コード例 #3
0
        public override void onUpdate(Context context, SlookCocktailManager cocktailBarManager, int[] cocktailIds)
        {
            // create RemoteViews
            RemoteViews rv  = new RemoteViews(context.PackageName, R.layout.feeds_panel_layout);
            string      str = context.Resources.getString([email protected]_contents);

            // set text in RemoteViews
            rv.setTextViewText(R.id.text, str + " at " + CurrentDate);

            // update cocktail
            for (int i = 0; i < cocktailIds.Length; i++)
            {
                cocktailBarManager.updateCocktail(cocktailIds[i], rv);
            }
        }