// Path: SunmiDesign/sunmiui/src/main/java/sunmi/sunmiui/utils/Adaptation.java
// public class Adaptation {
// 
//     public static int screenHeight = 0;
//     public static int screenWidth = 0;
//     public static float screenDensity = 0;
//     public static int densityDpi = 0;
//     // public static int version = Integer.valueOf(android.os.Build.VERSION.SDK_INT);
// 
//     public static final int SCREEN_9_16 = 1;    // 9:16
//     public static final int SCREEN_3_4 = 2;     // 3:4
//     public static final int SCREEN_4_3 = 3;     // 4:3
//     public static final int SCREEN_16_9 = 4;    // 16:9
//     public static int proportion = SCREEN_9_16;
// 
//     // public static final float PROPORTION_9_16 = 0.56f;    // 9:16
//     // public static final float PROPORTION_3_4 = 0.75f;     // 3:4
//     // public static final float PROPORTION_4_3 = 1.33f;     // 4:3
//     // public static final float PROPORTION_16_9 = 1.77f;    // 16:9
// 
//     public static final float AVERAGE1 = 0.655f;    // (9:16+3:4)/2
//     public static final float AVERAGE2 = 1.04f;     // (3:4+4:3)/2
//     public static final float AVERAGE3 = 1.55f;     // (4:3+16:9)/2
// 
//     public static void init(Context context) {
//         if (screenDensity == 0 || screenWidth == 0 || screenHeight == 0) {
//             DisplayMetrics dm = new DisplayMetrics();
//             WindowManager wm = (WindowManager) context
//                     .getSystemService(Context.WINDOW_SERVICE);
//             wm.getDefaultDisplay().getMetrics(dm);
//             Adaptation.screenDensity = dm.density;
//             Adaptation.screenHeight = dm.heightPixels;
//             Adaptation.screenWidth = dm.widthPixels;
//             Adaptation.densityDpi = dm.densityDpi;
//         }
// 
//         float proportionF = (float) screenWidth / (float) screenHeight;
// 
//         if (proportionF <= AVERAGE1) {
//             proportion = SCREEN_9_16;
//         } else if (proportionF <= AVERAGE2) {
//             proportion = SCREEN_3_4;
//         } else if (proportionF <= AVERAGE3) {
//             proportion = SCREEN_4_3;
//         } else if (proportionF > AVERAGE3) {
//             proportion = SCREEN_16_9;
//         }
// 
//         Log.i("SCREEN CONFIG", "screenHeight:" + screenHeight + ";screenWidth:"
//                 + screenWidth + ";screenDensity:" + screenDensity
//                 + ";densityDpi:" + densityDpi);
// 
//     }
// 
// }
// 
// Path: SunmiDesign/sunmiui/src/main/java/sunmi/sunmiui/utils/LogUtil.java
// public class LogUtil {
// 
//     public static final int VERBOSE = 1;
//     public static final int DEBUG = 2;
//     public static final int INFO = 3;
//     public static final int WARN = 4;
//     public static final int ERROR = 5;
//     public static final int NOTHING = 6;
//     public static int LEVEL = VERBOSE;
// 
//     public static void setLevel(int Level) {
//         LEVEL = Level;
//     }
// 
//     public static void v(String TAG, String msg) {
//         if (LEVEL <= VERBOSE && !TextUtils.isEmpty(msg)) {
//             MyLog(VERBOSE, TAG, msg);
//         }
//     }
// 
//     public static void d(String TAG, String msg) {
//         if (LEVEL <= DEBUG && !TextUtils.isEmpty(msg)) {
//             MyLog(DEBUG, TAG, msg);
//         }
//     }
// 
//     public static void i(String TAG, String msg) {
//         if (LEVEL <= INFO && !TextUtils.isEmpty(msg)) {
//             MyLog(INFO, TAG, msg);
//         }
//     }
// 
//     public static void w(String TAG, String msg) {
//         if (LEVEL <= WARN && !TextUtils.isEmpty(msg)) {
//             MyLog(WARN, TAG, msg);
//         }
//     }
// 
//     public static void e(String TAG, String msg) {
//         if (LEVEL <= ERROR && !TextUtils.isEmpty(msg)) {
//             MyLog(ERROR, TAG, msg);
//         }
//     }
// 
//     private static void MyLog(int type, String TAG, String msg) {
//         StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
// 
//         int index = 4;
//         String className = stackTrace[index].getFileName();
//         String methodName = stackTrace[index].getMethodName();
//         int lineNumber = stackTrace[index].getLineNumber();
// 
//         methodName = methodName.substring(0, 1).toUpperCase() + methodName.substring(1);
// 
//         StringBuilder stringBuilder = new StringBuilder();
//         stringBuilder.append("[ (").append(className).append(":").append(lineNumber).append(")#").append(methodName).append(" ] ");
//         stringBuilder.append(msg);
//         String logStr = stringBuilder.toString();
//         switch (type) {
//             case VERBOSE:
//                 Log.v(TAG, logStr);
//                 break;
//             case DEBUG:
//                 Log.d(TAG, logStr);
//                 break;
//             case INFO:
//                 Log.i(TAG, logStr);
//                 break;
//             case WARN:
//                 Log.w(TAG, logStr);
//                 break;
//             case ERROR:
//                 Log.e(TAG, logStr);
//                 break;
//             default:
//                 break;
//         }
// 
//     }
// 
// }


import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import sunmi.sunmiui.R;
import sunmi.sunmiui.utils.Adaptation;
import sunmi.sunmiui.utils.LogUtil;
package sunmi.sunmiui.dialog;



/**
 * Created by Administrator on 2016/6/14.
 */
public class ListDialog extends BaseDialog {

    private static ListDialog instance;

    private LinearLayout list;

    private ScrollView scrollView;

    private ItemClickListener itemClickListener;

    private ListDialog() {
    }

    public static ListDialog getInstance(){
        if(instance == null){
            instance = new ListDialog();
        }
        return instance;
    }

// Path: SunmiDesign/sunmiui/src/main/java/sunmi/sunmiui/utils/Adaptation.java
// public class Adaptation {
// 
//     public static int screenHeight = 0;
//     public static int screenWidth = 0;
//     public static float screenDensity = 0;
//     public static int densityDpi = 0;
//     // public static int version = Integer.valueOf(android.os.Build.VERSION.SDK_INT);
// 
//     public static final int SCREEN_9_16 = 1;    // 9:16
//     public static final int SCREEN_3_4 = 2;     // 3:4
//     public static final int SCREEN_4_3 = 3;     // 4:3
//     public static final int SCREEN_16_9 = 4;    // 16:9
//     public static int proportion = SCREEN_9_16;
// 
//     // public static final float PROPORTION_9_16 = 0.56f;    // 9:16
//     // public static final float PROPORTION_3_4 = 0.75f;     // 3:4
//     // public static final float PROPORTION_4_3 = 1.33f;     // 4:3
//     // public static final float PROPORTION_16_9 = 1.77f;    // 16:9
// 
//     public static final float AVERAGE1 = 0.655f;    // (9:16+3:4)/2
//     public static final float AVERAGE2 = 1.04f;     // (3:4+4:3)/2
//     public static final float AVERAGE3 = 1.55f;     // (4:3+16:9)/2
// 
//     public static void init(Context context) {
//         if (screenDensity == 0 || screenWidth == 0 || screenHeight == 0) {
//             DisplayMetrics dm = new DisplayMetrics();
//             WindowManager wm = (WindowManager) context
//                     .getSystemService(Context.WINDOW_SERVICE);
//             wm.getDefaultDisplay().getMetrics(dm);
//             Adaptation.screenDensity = dm.density;
//             Adaptation.screenHeight = dm.heightPixels;
//             Adaptation.screenWidth = dm.widthPixels;
//             Adaptation.densityDpi = dm.densityDpi;
//         }
// 
//         float proportionF = (float) screenWidth / (float) screenHeight;
// 
//         if (proportionF <= AVERAGE1) {
//             proportion = SCREEN_9_16;
//         } else if (proportionF <= AVERAGE2) {
//             proportion = SCREEN_3_4;
//         } else if (proportionF <= AVERAGE3) {
//             proportion = SCREEN_4_3;
//         } else if (proportionF > AVERAGE3) {
//             proportion = SCREEN_16_9;
//         }
// 
//         Log.i("SCREEN CONFIG", "screenHeight:" + screenHeight + ";screenWidth:"
//                 + screenWidth + ";screenDensity:" + screenDensity
//                 + ";densityDpi:" + densityDpi);
// 
//     }
// 
// }
// 
// Path: SunmiDesign/sunmiui/src/main/java/sunmi/sunmiui/utils/LogUtil.java
// public class LogUtil {
// 
//     public static final int VERBOSE = 1;
//     public static final int DEBUG = 2;
//     public static final int INFO = 3;
//     public static final int WARN = 4;
//     public static final int ERROR = 5;
//     public static final int NOTHING = 6;
//     public static int LEVEL = VERBOSE;
// 
//     public static void setLevel(int Level) {
//         LEVEL = Level;
//     }
// 
//     public static void v(String TAG, String msg) {
//         if (LEVEL <= VERBOSE && !TextUtils.isEmpty(msg)) {
//             MyLog(VERBOSE, TAG, msg);
//         }
//     }
// 
//     public static void d(String TAG, String msg) {
//         if (LEVEL <= DEBUG && !TextUtils.isEmpty(msg)) {
//             MyLog(DEBUG, TAG, msg);
//         }
//     }
// 
//     public static void i(String TAG, String msg) {
//         if (LEVEL <= INFO && !TextUtils.isEmpty(msg)) {
//             MyLog(INFO, TAG, msg);
//         }
//     }
// 
//     public static void w(String TAG, String msg) {
//         if (LEVEL <= WARN && !TextUtils.isEmpty(msg)) {
//             MyLog(WARN, TAG, msg);
//         }
//     }
// 
//     public static void e(String TAG, String msg) {
//         if (LEVEL <= ERROR && !TextUtils.isEmpty(msg)) {
//             MyLog(ERROR, TAG, msg);
//         }
//     }
// 
//     private static void MyLog(int type, String TAG, String msg) {
//         StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
// 
//         int index = 4;
//         String className = stackTrace[index].getFileName();
//         String methodName = stackTrace[index].getMethodName();
//         int lineNumber = stackTrace[index].getLineNumber();
// 
//         methodName = methodName.substring(0, 1).toUpperCase() + methodName.substring(1);
// 
//         StringBuilder stringBuilder = new StringBuilder();
//         stringBuilder.append("[ (").append(className).append(":").append(lineNumber).append(")#").append(methodName).append(" ] ");
//         stringBuilder.append(msg);
//         String logStr = stringBuilder.toString();
//         switch (type) {
//             case VERBOSE:
//                 Log.v(TAG, logStr);
//                 break;
//             case DEBUG:
//                 Log.d(TAG, logStr);
//                 break;
//             case INFO:
//                 Log.i(TAG, logStr);
//                 break;
//             case WARN:
//                 Log.w(TAG, logStr);
//                 break;
//             case ERROR:
//                 Log.e(TAG, logStr);
//                 break;
//             default:
//                 break;
//         }
// 
//     }
// 
// }


// Path: SunmiDesign/sunmiui/src/main/java/sunmi/sunmiui/dialog/ListDialog.java
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import sunmi.sunmiui.R;
import sunmi.sunmiui.utils.Adaptation;
import sunmi.sunmiui.utils.LogUtil;

package sunmi.sunmiui.dialog;



/**
 * Created by Administrator on 2016/6/14.
 */
public class ListDialog extends BaseDialog {

    private static ListDialog instance;

    private LinearLayout list;

    private ScrollView scrollView;

    private ItemClickListener itemClickListener;

    private ListDialog() {
    }

    public static ListDialog getInstance(){
        if(instance == null){
            instance = new ListDialog();
        }
        return instance;
    }

    public void setItemClickListener(ItemClickListener listener){