RemoteViews setTextColor - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:setTextColor
	} 
 
	@Kroll.method 
	public void setTextColor(int viewId, int color)
	{ 
		remoteViews.setTextColor(viewId, color);
	} 
 
	@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);
	} 
 
7
CodeRank
This code example shows how to use the following methods:setTextColor, setTextViewText
      prefix = "";
    } 
 
    if (selectedTime != timeModel.getOriginal()) {
      if (selectedTime.after(timeModel.getOriginal())) {
        remoteView.setTextColor(viewId, Color.RED);
      } else { 
        remoteView.setTextColor(viewId, Color.GREEN);
      } 
    } 
    remoteView.setTextViewText(viewId, prefix + DateUtil.formatShortDateTime(selectedTime));
  } 
 
  public void onDeleted(final Context context, final int[] appWidgetIds) {
 
  } 
 
  public void onEnabled(final Context context) {
 
  } 
5
CodeRank
This code example shows how to use the following methods:setTextColor
	 * @param color 
	 * @param layoutId 
	 * @param widgetClass 
	 */ 
	public static void setTextColor(Context context, int componentResId, int color, int layoutId, Class<?> widgetClass) {
		RemoteViews view = new RemoteViews(context.getPackageName(), layoutId);
		view.setTextColor(componentResId, color);		
		AppWidgetManager man = AppWidgetManager.getInstance(context);
		ComponentName widget = new ComponentName(context.getApplicationContext(), widgetClass);
		man.updateAppWidget(widget, view);
	} 
	 
	/** 
	 *  
	 * Static method to set the image of a component in a widget. 
	 * Use this method if you don't want to instantiate an instance 
	 * of the WidgetUtil class. 
	 *  
	 * @param context 
	 * @param componentResId 
4
CodeRank
This code example shows how to use the following methods:setFloat, setTextColor
This code example shows how to use the following methods:setTextColor
	} 
 
	@Kroll.method 
	public void setTextColor(int viewId, int color)
	{ 
		remoteViews.setTextColor(viewId, color);
	} 
 
	@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);
	} 
 
4
CodeRank
This code example shows how to use the following methods:setTextColor
        mRemoteViews.setTextViewText(viewId, text);
    } 
 
    @Override 
    public void setTextViewColor(int viewId, int color) {
        mRemoteViews.setTextColor(viewId, color);
    } 
 
    @Override 
    public void setTextViewMaxLines(int viewId, int maxLines) {
        mRemoteViews.setInt(viewId, "setMaxLines", maxLines);
    } 
 
    @Override 
    public void setTextViewSingleLine(int viewId, boolean singleLine) {
        mRemoteViews.setBoolean(viewId, "setSingleLine", singleLine);
    } 
 
    @Override 
    public void setTextViewTextSize(int viewId, int unit, float size) {
4
CodeRank
This code example shows how to use the following methods:setTextColor
	private void setTextBGColor(RemoteViews rv, int viewId, int color) {
		if (isAdvanced) {
			rv.setInt(viewId, "setBackgroundColor", color);
		} else { 
			// It is painful in android <2.2 to change a background color. 
			rv.setTextColor(viewId, color);
		} 
	} 
 
} 
4
CodeRank

Related RemoteViews setTextColor Questions & Answers:

setTextColor Method Overview
Equivalent to calling setTextColor(int).
See Code Examples for other Android RemoteViews Methods: