Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
paroca72 committed Nov 10, 2019
1 parent bf774af commit bc36779
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
4 changes: 4 additions & 0 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,9 @@
<orderEntry type="library" name="Gradle: com.android.support:support-compat:26.1.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.0.0@aar" level="project" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="library" />
</component>
</module>
15 changes: 0 additions & 15 deletions library/src/main/java/com/sccomponents/gauges/library/ScBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,6 @@ public float dipToPixel(float dip) {
return dip * metrics.density;
}

/**
* Convert pixel to scaled pixel (sp)
* @param px source pixel
* @return scaled pixel
*/
@SuppressWarnings("unused")
public float pixelToScaledPixel(float px) {
// Get the display metrics
DisplayMetrics metrics = this.getDisplayMetrics(this.getContext());

// Convert
float scaledDensity = metrics.scaledDensity;
return scaledDensity == 0 ? 0.0f: px / scaledDensity;
}


// ***************************************************************************************
// Static methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ public ScGauge(Context context, AttributeSet attrs, int defStyleAttr) {
* @param name attribute name
* @return the Id
*/
@SuppressWarnings("all")
private int getAttributeId(String prefix, String name) {
// Holders
Field[] allFields = R.styleable.class.getFields();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public ScWriter() {
// Update the painter
Paint painter = this.getPainter();
painter.setStrokeWidth(0.0f);
painter.setTextSize(30.0f);
painter.setTextSize(0.0f);
painter.setStyle(Paint.Style.FILL);

this.mBackgroundPaint = new Paint();
Expand Down

0 comments on commit bc36779

Please sign in to comment.