Skip to content
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ performant/smooth scrolling **image view component framework** to define differe

Gradle dependency:
```Groovy
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
compile 'com.github.siyamed:android-shape-imageview:0.9.3'
```

###Shader Based ImageView's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import com.github.siyamed.shapeimageview.BuildConfig;

class CopyInputStream {
private static final String TAG = SvgToPath.TAG;
Expand All @@ -20,7 +21,10 @@ public CopyInputStream(InputStream is) {
copy();
}
catch(IOException ex) {
Log.w(TAG, "IOException in CopyInputStream " + ex.toString());
if (BuildConfig.DEBUG) {
Log.w(TAG, "IOException in CopyInputStream " + ex.toString());
}

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.io.IOException;
import java.util.HashMap;
import java.util.Stack;
import com.github.siyamed.shapeimageview.BuildConfig;

@SuppressWarnings("StatementWithEmptyBody")
class IdHandler {
Expand Down Expand Up @@ -97,8 +98,10 @@ void endElement() {
if (idRecordingStack.size() > 0){
idRecordingStack.lastElement().sb.append(xml);
}
if (BuildConfig.DEBUG) {
Log.w(TAG, xml);
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.graphics.Path;
import android.graphics.RectF;
import android.util.Log;
import com.github.siyamed.shapeimageview.BuildConfig;

class PathParser {

Expand Down Expand Up @@ -224,7 +225,10 @@ public static Path doPath(String s) {
break;
}
default:
if (BuildConfig.DEBUG) {
Log.w(TAG, "Invalid path command: " + cmd);
}

ph.advance();
}
if (!wasCurve) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.Deque;
import java.util.HashMap;
import java.util.LinkedList;
import com.github.siyamed.shapeimageview.BuildConfig;

//https://github.com/geosolutions-it/mapsforge/tree/master/svg-android
/*
Expand Down Expand Up @@ -68,7 +69,10 @@ private static PathInfo parse(InputStream in, boolean ignoreDefs, float dpi) {

return svgHandler.pathInfo;
} catch (Exception e) {
if (BuildConfig.DEBUG) {
Log.w(TAG, "Parse error: " + e);
}

throw new RuntimeException(e);
}
}
Expand Down Expand Up @@ -324,7 +328,9 @@ void startElement() {
} else if (!hidden && localName.equals("metadata")) {
// skip
} else if (!hidden) {
if (BuildConfig.DEBUG) {
Log.d(TAG, String.format("Unrecognized tag: %s (%s)", localName, showAttributes(atts)));
}
}
}

Expand Down Expand Up @@ -375,4 +381,4 @@ final Float getFloatAttr(String name, XmlPullParser attributes, Float defaultVal
Float result = ParseUtil.convertUnits(name, attributes, dpi, width, height);
return result == null ? defaultValue : result;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.graphics.Matrix;
import android.util.Log;

import com.github.siyamed.shapeimageview.BuildConfig;
class TransformParser {
private static final String TAG = SvgToPath.class.getSimpleName();

Expand Down Expand Up @@ -92,7 +92,10 @@ private static void parseTransformItem(String s, Matrix matrix) {
matrix.preTranslate(-cx, -cy);
}
} else {
if (BuildConfig.DEBUG) {
Log.w(TAG, "Invalid transform (" + s + ")");
}

}
}
}