Code example for RemoteViews

Methods: setFloat

0
			rv.setViewPadding(viewId, leftPadding, topPadding, rightPadding, bottomPadding);
		} 
	} 
 
	public static void setTextSize(Context context, RemoteViews rv, int viewId, int dimenId) {
		rv.setFloat(viewId, METHOD_SET_TEXT_SIZE, getScaledValue(context, dimenId));
	} 
 
	public static void setBackgroundColor(RemoteViews rv, int viewId, int color) {
		rv.setInt(viewId, METHOD_SET_BACKGROUND_COLOR, color);
	} 
 
	public static void setHeight(Context context, RemoteViews rv, int viewId, int dimenId) {
		float height = getScaledValueInPixel(context, dimenId);
		rv.setInt(viewId, "setHeight", Math.round(height));
	} 
 
	private static float getScaledValueInPixel(Context context, int dimenId) {
		float resValue = getResourceValue(context, dimenId);
		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
Contextual code suggestions in your IDE  Get Codota for Java