private Bitmap createWearBitmap(long start, long end) { return new BgSparklineBuilder(mContext) .setBgGraphBuilder(new BgGraphBuilder(mContext)) .setStart(start) .setEnd(end) .showHighLine() .showLowLine() .showAxes() .setWidthPx(400) .setHeightPx(400) .setSmallDots() .build(); }
public BgSparklineBuilder setTinyDots() { return this.setTinyDots(true); }
private void updateGraph() { long end = System.currentTimeMillis() + (60000 * 5); long start = end - (60000 * 60 * 3) - (60000 * 10); BgGraphBuilder bgGraphBuilder = new BgGraphBuilder(this, start, end); final Bitmap dreamBitmap = new BgSparklineBuilder(this) .setBgGraphBuilder(bgGraphBuilder) .setWidthPx(graph_width) .setHeightPx(graph_height) .showHighLine() .showLowLine() .setStart(System.currentTimeMillis() - 60000 * 60 * 3) .showAxes(true) .setBackgroundColor(getCol(ColorCache.X.color_notification_chart_background)) .setShowFiltered(DexCollectionType.hasFiltered() && Pref.getBooleanDefaultFalse("show_filtered_curve")) .build(); graphimage.setImageBitmap(dreamBitmap); }
iconBitmap = new BgSparklineBuilder(mContext) .setHeight(64) .setWidth(64) .setStart(System.currentTimeMillis() - 60000 * 60 * 3) .setBgGraphBuilder(bgGraphBuilder) .setBackgroundColor(getCol(X.color_notification_chart_background)) .build(); if (!setLargeIcon) b.setLargeIcon(iconBitmap); Notification.BigPictureStyle bigPictureStyle = new Notification.BigPictureStyle(); notifiationBitmap = new BgSparklineBuilder(mContext) .setBgGraphBuilder(bgGraphBuilder) .showHighLine() .showLowLine() .setStart(System.currentTimeMillis() - 60000 * 60 * 3) .showAxes(true) .setBackgroundColor(getCol(X.color_notification_chart_background)) .setShowFiltered(DexCollectionType.hasFiltered() && Pref.getBooleanDefaultFalse("show_filtered_curve")) .build(); bigPictureStyle.bigPicture(notifiationBitmap) .setSummaryText(deltaString)
int height = appWidgetManager.getAppWidgetOptions(appWidgetId).getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT); int width = appWidgetManager.getAppWidgetOptions(appWidgetId).getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH); views.setImageViewBitmap(R.id.widgetGraph, new BgSparklineBuilder(context) .setBgGraphBuilder(bgGraphBuilder) .setBackgroundColor(ColorCache.getCol(ColorCache.X.color_widget_chart_background)) .setHeight(height).setWidth(width).showHighLine(showLines).showLowLine(showLines).build());
return getViewBitmap(chart); } else { return getResizedBitmap(getViewBitmap(chart),width,height);
public BgSparklineBuilder setSmallDots() { return this.setSmallDots(true); }
private void updateGraph() { long end = System.currentTimeMillis() + (60000 * 5); long start = end - (60000 * 60 * 3) - (60000 * 10); BgGraphBuilder bgGraphBuilder = new BgGraphBuilder(this, start, end); final Bitmap dreamBitmap = new BgSparklineBuilder(this) .setBgGraphBuilder(bgGraphBuilder) .setWidthPx(graph_width) .setHeightPx(graph_height) .showHighLine() .showLowLine() .setStart(System.currentTimeMillis() - 60000 * 60 * 3) .showAxes(true) .setBackgroundColor(getCol(ColorCache.X.color_notification_chart_background)) .setShowFiltered(DexCollectionType.hasFiltered() && Pref.getBooleanDefaultFalse("show_filtered_curve")) .build(); graphimage.setImageBitmap(dreamBitmap); }
iconBitmap = new BgSparklineBuilder(mContext) .setHeight(64) .setWidth(64) .setStart(System.currentTimeMillis() - 60000 * 60 * 3) .setBgGraphBuilder(bgGraphBuilder) .setBackgroundColor(getCol(X.color_notification_chart_background)) .build(); if (!setLargeIcon) b.setLargeIcon(iconBitmap); Notification.BigPictureStyle bigPictureStyle = new Notification.BigPictureStyle(); notifiationBitmap = new BgSparklineBuilder(mContext) .setBgGraphBuilder(bgGraphBuilder) .showHighLine() .showLowLine() .setStart(System.currentTimeMillis() - 60000 * 60 * 3) .showAxes(true) .setBackgroundColor(getCol(X.color_notification_chart_background)) .setShowFiltered(DexCollectionType.hasFiltered() && Pref.getBooleanDefaultFalse("show_filtered_curve")) .build(); bigPictureStyle.bigPicture(notifiationBitmap) .setSummaryText(deltaString)
int height = appWidgetManager.getAppWidgetOptions(appWidgetId).getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT); int width = appWidgetManager.getAppWidgetOptions(appWidgetId).getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH); views.setImageViewBitmap(R.id.widgetGraph, new BgSparklineBuilder(context) .setBgGraphBuilder(bgGraphBuilder) .setBackgroundColor(ColorCache.getCol(ColorCache.X.color_widget_chart_background)) .setHeight(height).setWidth(width).showHighLine(showLines).showLowLine(showLines).build());
return getViewBitmap(chart); } else { return getResizedBitmap(getViewBitmap(chart),width,height);
public BgSparklineBuilder setSmallDots() { return this.setSmallDots(true); }
private Bitmap createWearBitmap(long start, long end) { return new BgSparklineBuilder(mContext) .setBgGraphBuilder(new BgGraphBuilder(mContext)) .setStart(start) .setEnd(end) .showHighLine() .showLowLine() .showAxes() .setWidthPx(400) .setHeightPx(400) .setSmallDots() .build(); }
return getViewBitmap(chart); } else { return getResizedBitmap(getViewBitmap(chart),width,height);
public BgSparklineBuilder setSmallDots() { return this.setSmallDots(true); }
public BgSparklineBuilder setTinyDots() { return this.setTinyDots(true); }
private Bitmap createWearBitmap(long start, long end) { return new BgSparklineBuilder(mContext) .setBgGraphBuilder(new BgGraphBuilder(mContext)) .setStart(start) .setEnd(end) .showHighLine() .showLowLine() .showAxes() .setWidthPx(400) .setHeightPx(400) .setSmallDots() .build(); }
public BgSparklineBuilder setTinyDots() { return this.setTinyDots(true); }
Bitmap bgTrend = new BgSparklineBuilder(this.context) .setBgGraphBuilder(this.bgGraphBuilder) .setStart(System.currentTimeMillis() - 60000 * 60 * trendPeriod) .setEnd(System.currentTimeMillis()) .setHeightPx(PebbleUtil.pebbleDisplayType == PebbleDisplayType.TrendClassic ? 63 : 84) // 84 .setWidthPx(PebbleUtil.pebbleDisplayType == PebbleDisplayType.TrendClassic ? 84 : 144) // 144 .showHighLine(highLine) .showLowLine(lowLine) .setTinyDots(Pref.getBoolean("pebble_tiny_dots", false)) .setSmallDots(!Pref.getBoolean("pebble_tiny_dots", false)) .build();
Bitmap bgTrend = new BgSparklineBuilder(this.context) .setBgGraphBuilder(this.bgGraphBuilder) .setStart(System.currentTimeMillis() - 60000 * 60 * trendPeriod) .setEnd(System.currentTimeMillis()) .setHeightPx(PebbleUtil.pebbleDisplayType == PebbleDisplayType.TrendClassic ? 63 : 84) // 84 .setWidthPx(PebbleUtil.pebbleDisplayType == PebbleDisplayType.TrendClassic ? 84 : 144) // 144 .showHighLine(highLine) .showLowLine(lowLine) .setTinyDots(Pref.getBooleanDefaultFalse("pebble_tiny_dots")) .setShowFiltered(Pref.getBooleanDefaultFalse("pebble_filtered_line")) .build();