From 4cc82c594a3456d38eb0adcb43335ee1ff1f2ffd Mon Sep 17 00:00:00 2001 From: Jaculabilis Date: Sat, 15 Oct 2016 23:24:27 -0500 Subject: [PATCH] Custom default images now being used --- .../horse/jaeil/microframe/FrameWidget.java | 18 ++---------------- .../example_appwidget_preview.png | Bin 3522 -> 0 bytes .../example_appwidget_preview2.png | Bin 16732 -> 0 bytes .../res/drawable-nodpi/microframe_preview.png | Bin 0 -> 1594 bytes app/src/main/res/layout/frame_widget.xml | 4 ++-- .../res/layout/frame_widget_configure.xml | 4 ++-- app/src/main/res/xml/frame_widget_info.xml | 2 +- 7 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 app/src/main/res/drawable-nodpi/example_appwidget_preview.png delete mode 100644 app/src/main/res/drawable-nodpi/example_appwidget_preview2.png create mode 100644 app/src/main/res/drawable-nodpi/microframe_preview.png diff --git a/app/src/main/java/horse/jaeil/microframe/FrameWidget.java b/app/src/main/java/horse/jaeil/microframe/FrameWidget.java index f6fc4b6..199a6f5 100644 --- a/app/src/main/java/horse/jaeil/microframe/FrameWidget.java +++ b/app/src/main/java/horse/jaeil/microframe/FrameWidget.java @@ -18,10 +18,7 @@ public class FrameWidget extends AppWidgetProvider { static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { - String uriString = FrameWidgetConfigureActivity.loadImgRef(context, appWidgetId); - Log.i(TAG, "Widget updating with uriString = \"" + uriString + "\""); - RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.frame_widget); if (uriString.equals("")) { views.setImageViewResource(R.id.frameImage, R.drawable.frame_default); @@ -31,22 +28,11 @@ public class FrameWidget extends AppWidgetProvider { Bitmap bitmap = MediaStore.Images.Media.getBitmap(context.getContentResolver(), uri); views.setImageViewBitmap(R.id.frameImage, bitmap); } catch (Exception e) { - e.printStackTrace(); + Log.e(TAG, "Could not load bitmap from URI \"" + uriString + "\""); + views.setImageViewResource(R.id.frameImage, R.drawable.frame_default); } - } appWidgetManager.updateAppWidget(appWidgetId, views); - - // Depending on the URI string, set the widget image -// if (!uriString.equals("")) { -// Uri uri = Uri.parse(uriString); -// Log.i(TAG, "Parsed URI: " + uri.toString()); -// views -// .setImageViewUri(R.id.frameImage, uri); -// } else { -// views -// .setImageViewResource(R.id.frameImage, R.drawable.frame_default); -// } } @Override diff --git a/app/src/main/res/drawable-nodpi/example_appwidget_preview.png b/app/src/main/res/drawable-nodpi/example_appwidget_preview.png deleted file mode 100644 index 894b069a4907d258f60b1b2406b90f5a0fe1c35b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3522 zcmaJ^3piA3_a6@xDwm_1J~1d=T*eGD7*t{~G6s#392#aYX)b2QC2|g;(n0D}E^|`S zMRLit5fgHkOAh7IFc`OL+?mN`#$lds_TJBqcXqPd zF27eE1OjbG+uOJTvj{kk%Sr>+x% z-dKicf&VgL23l(Uhm za0C)&0{;8Z0;16gen?jv+rMK0nx$3%lSxBDAfch52BAg zOB5zPOrOHg{*GWnWcboaG$x5k0dFAUeW<}qOD%xue^MaR{(+@1{w@At|m`Dt&2q9Lv6L_Cv9$5E*l zzgN*YfXbvY0;n{w^(h4S5C-o{qHHW2{>uY{L82)PCZ6I;MB7+u0T>1(5&>z2GB&X? zGBiP;PzWd#1v5ig8Cyfm5HJ|b#P$Tj?7OcG)i;<-q%gnx68`IJ`a|E1W+2mm$Tmbe zDTGL{rBlh^zmi6he#`~_L%hFz2|wn7_@OTZAOqRh+W)cD-?*%1F}TtNA!^@$Xq z-|0YO+ud)}1%ag6ogHx~P|nBo_4N||yhO6@-!vwcNXC{{B_L@`-0Qp9>Oce3v0&4iBBlFXuwKa*PX>tiwI*{1(Wpz!G`auxgGBLL-uAf-! z76{uWmh_6aK>90dlBCv&BL)2dZ%3u_dI20mHWybh^l26d+5^Pu{48|m3%7*6hhiCuzC}?d@tpkB%Ja5*BSO6RzzJ)F(!8A;WsgO`>)Toe9%UR z+kH6adFGg!ZSMw3oSE&m*(5&XoZ2RC@4o&)S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