mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Remove debug code
This commit is contained in:
@@ -25,9 +25,6 @@ import android.widget.RemoteViews;
|
||||
import org.isoron.uhabits.models.Habit;
|
||||
import org.isoron.uhabits.views.SmallWidgetView;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
public class SmallWidgetProvider extends AppWidgetProvider
|
||||
{
|
||||
@Override
|
||||
@@ -41,7 +38,7 @@ public class SmallWidgetProvider extends AppWidgetProvider
|
||||
{
|
||||
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.small_widget);
|
||||
|
||||
Habit habit = Habit.get((long) widgetId);
|
||||
Habit habit = Habit.get(1L);
|
||||
|
||||
SmallWidgetView widgetView = new SmallWidgetView(context);
|
||||
widgetView.setDrawingCacheEnabled(true);
|
||||
@@ -52,16 +49,6 @@ public class SmallWidgetProvider extends AppWidgetProvider
|
||||
|
||||
Bitmap drawingCache = widgetView.getDrawingCache();
|
||||
|
||||
try
|
||||
{
|
||||
drawingCache.compress(Bitmap.CompressFormat.PNG, 100,
|
||||
new FileOutputStream(context.getFilesDir() + "/widget.png"));
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
;
|
||||
remoteViews.setTextViewText(R.id.tvName, habit.name);
|
||||
remoteViews.setImageViewBitmap(R.id.imageView, drawingCache);
|
||||
remoteViews.setOnClickPendingIntent(R.id.imageView,
|
||||
|
||||
@@ -26,7 +26,6 @@ import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import org.isoron.helpers.ColorHelper;
|
||||
@@ -153,7 +152,6 @@ public class SmallWidgetView extends View
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
size = Math.min(widthMeasureSpec, heightMeasureSpec);
|
||||
setMeasuredDimension(size, size);
|
||||
Log.d("SmallWidgetView", "" + size);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user