// Path: stylishwidget/src/main/java/com/app/infideap/stylishwidget/util/Utils.java
// public class Utils {
//     public static float convertPixelsToDp(float px) {
//         DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
//         float dp = px / (metrics.densityDpi / 160f);
//         return Math.round(dp);
//     }
// 
//     public static float convertDpToPixel(float dp) {
//         DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
//         float px = dp * (metrics.densityDpi / 160f);
//         return Math.round(px);
//     }
// 
//     public static int adjustAlpha(int color, int alpha) {
//         int red = Color.red(color);
//         int green = Color.green(color);
//         int blue = Color.blue(color);
//         return Color.argb(alpha, red, green, blue);
//     }
// }


import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.os.Build;
import androidx.annotation.Px;
import androidx.annotation.RequiresApi;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import com.app.infideap.stylishwidget.R;
import com.app.infideap.stylishwidget.util.Utils;
import java.util.Locale;
package com.app.infideap.stylishwidget.view;





/**
 * Created by Zariman on 13/4/2016.
 */
public class AMeter extends LinearLayout {
    private static final String TAG = AMeter.class.getSimpleName();
    private float value;
    private int meterColor;
    private View view;
    private float startAngle = 130;
    private float sweepAngle = 280;
    private float maxValue;
    private View needle1View;
    private View needle2View;
    private int textStyle;

    private float textSize;
// Path: stylishwidget/src/main/java/com/app/infideap/stylishwidget/util/Utils.java
// public class Utils {
//     public static float convertPixelsToDp(float px) {
//         DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
//         float dp = px / (metrics.densityDpi / 160f);
//         return Math.round(dp);
//     }
// 
//     public static float convertDpToPixel(float dp) {
//         DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
//         float px = dp * (metrics.densityDpi / 160f);
//         return Math.round(px);
//     }
// 
//     public static int adjustAlpha(int color, int alpha) {
//         int red = Color.red(color);
//         int green = Color.green(color);
//         int blue = Color.blue(color);
//         return Color.argb(alpha, red, green, blue);
//     }
// }


// Path: stylishwidget/src/main/java/com/app/infideap/stylishwidget/view/AMeter.java
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.os.Build;
import androidx.annotation.Px;
import androidx.annotation.RequiresApi;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import com.app.infideap.stylishwidget.R;
import com.app.infideap.stylishwidget.util.Utils;
import java.util.Locale;

package com.app.infideap.stylishwidget.view;





/**
 * Created by Zariman on 13/4/2016.
 */
public class AMeter extends LinearLayout {
    private static final String TAG = AMeter.class.getSimpleName();
    private float value;
    private int meterColor;
    private View view;
    private float startAngle = 130;
    private float sweepAngle = 280;
    private float maxValue;
    private View needle1View;
    private View needle2View;
    private int textStyle;

    private float textSize;
    private int gapBottom = (int) Utils.convertDpToPixel(30);