Android RemoteViews - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android RemoteViews class.

This code example shows how to use the following methods:
        } 
 
        private ProgressNotification generatePreICS(OpNotification opn, int layout, TextViewIds viewIds) {
            Notification n = new Notification(opn.getDrawable(), opn.getTickerText(), currentTimeMillis());
 
            n.contentView = new RemoteViews(context.getApplicationContext().getPackageName(), layout);
 
            notificationStyles.getTitleAppearance().setOn(n.contentView, viewIds.title);
            StatusBarNotificationStyles.TextAppearance textAppearance = notificationStyles.getTextAppearance();
            textAppearance.setOn(n.contentView, viewIds.text);
            textAppearance.setOn(n.contentView, viewIds.info);
 
            n.contentView.setTextViewText(viewIds.title, opn.getEventTitle());
            n.contentView.setTextViewText(viewIds.text, opn.getEventDetail());
            n.contentView.setProgressBar(android.R.id.progress, 1, 0, true);
            return new ProgressNotification(n, viewIds);
        } 
 
        private static class ContentInfoTextViewSearchPredicate implements Predicate<View> {
            private int contentInfoTextViewId;
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setTextViewText
	} 
 
	@Kroll.method 
	public void setTextViewText(int viewId, String text)
	{ 
		remoteViews.setTextViewText(viewId, text);
	} 
 
	@Kroll.method 
	public void setViewVisibility(int viewId, int visibility)
	{ 
		remoteViews.setViewVisibility(viewId, visibility);
	} 
 
	@Kroll.method 
	public void setChronometer(int viewId, long base, String format, boolean started)
	{ 
		remoteViews.setChronometer(viewId, base, format, started);
	} 
 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setOnClickPendingIntent
        active.putExtra(COMMAND, buttonCode);
         
        // Make this pending intent unique to prevent updating other intents 
        Uri data = Uri.withAppendedPath(Uri.parse(uri + "://widget/id/#"+buttonCode), String.valueOf(widgetId));	
		active.setData(data);
        remoteView.setOnClickPendingIntent(viewId, PendingIntent.getBroadcast(context, 0, active, PendingIntent.FLAG_UPDATE_CURRENT));
	} 
	 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setImageViewResource, setOnClickPendingIntent, setViewVisibility
            // SettingsAppWidgetProvider.logD(">> updateView IN. Widget: "+appWidgetId+" Button:"+buttonID); 
 
            // SettingsAppWidgetProvider.logD("updateView -> Is Visible"); 
 
            // Set it visible 
            views.setViewVisibility(buttonLayout, View.VISIBLE);
            if (buttonSep != null) {
                views.setViewVisibility(buttonSep, View.VISIBLE);
            } 
 
            // SettingsAppWidgetProvider.logD("updateView -> Will register Intent"); 
            // Register the Intent 
            views.setOnClickPendingIntent(buttonLayout,
                    getLaunchPendingIntent(context, appWidgetId, buttonID));
 
            // SettingsAppWidgetProvider.logD("updateView -> Set current Icon"); 
            // Update icon to the one set by updateState 
            views.setImageViewResource(buttonIcon, currentIcon);
 
            // SettingsAppWidgetProvider.logD("updateView -> Set current State"); 

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: apply
        RemoteViews rv=(RemoteViews)i.getParcelableExtra(EXTRA_CONTENT); 
        ViewGroup frame=(ViewGroup)findViewById(android.R.id.content); 
 
        frame.removeAllViews(); 
 
        View pluginView=rv.apply(RemoteViewsHostActivity.this, frame); 
 
        frame.addView(pluginView); 
      } 
    } 
  }; 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android RemoteViews Questions & Answers:

See Code Examples for Android RemoteViews Methods: