// Path: app/src/main/java/com/koma/filemanager/util/LogUtils.java
// public class LogUtils {
//     private static final boolean IS_DEBUG = true;
//     private static final String TAG = "FileManager";
// 
//     public static void i(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.i(TAG, buildString(tag, msg));
//         }
//     }
// 
//     public static void e(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.e(TAG, buildString(tag, msg));
//         }
//     }
// 
//     private static String buildString(String tag, String msg) {
//         StringBuilder sb = new StringBuilder(tag);
//         sb.append("----");
//         sb.append(msg);
//         return sb.toString();
//     }
// }


import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.koma.filemanager.R;
import com.koma.filemanager.util.LogUtils;
        init(context, null);
    }

    public CategoryButton(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public CategoryButton(Context context, AttributeSet attributeSet, int defStyleAttr) {
        super(context, attributeSet, 0);
        init(context, attributeSet);
    }


    private void init(Context context, AttributeSet attributeSet) {
        setOrientation(VERTICAL);
        inflate(context, R.layout.category_button_layout, this);
        mCount = DEFAULT_COUNT_TEXT;
        mContext = context;
        mImageView = (ImageView) findViewById(R.id.iv_category_button);
        mTitleTextView = (TextView) findViewById(R.id.tv_category_button_title);
        mCountTextView = (TextView) findViewById(R.id.tv_category_button_count);
        if (attributeSet == null) {
            return;
        }
        TypedArray typedArray = context.obtainStyledAttributes(attributeSet, R.styleable.CategoryButton);
        try {
            setTitleText(typedArray.getString(R.styleable.CategoryButton_category_text));
            setImageView(typedArray.getDrawable(R.styleable.CategoryButton_category_image));
            setCountText(mCount);
        } catch (Exception e) {
// Path: app/src/main/java/com/koma/filemanager/util/LogUtils.java
// public class LogUtils {
//     private static final boolean IS_DEBUG = true;
//     private static final String TAG = "FileManager";
// 
//     public static void i(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.i(TAG, buildString(tag, msg));
//         }
//     }
// 
//     public static void e(String tag, String msg) {
//         if (IS_DEBUG) {
//             Log.e(TAG, buildString(tag, msg));
//         }
//     }
// 
//     private static String buildString(String tag, String msg) {
//         StringBuilder sb = new StringBuilder(tag);
//         sb.append("----");
//         sb.append(msg);
//         return sb.toString();
//     }
// }


// Path: app/src/main/java/com/koma/filemanager/widget/CategoryButton.java
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.koma.filemanager.R;
import com.koma.filemanager.util.LogUtils;

        init(context, null);
    }

    public CategoryButton(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public CategoryButton(Context context, AttributeSet attributeSet, int defStyleAttr) {
        super(context, attributeSet, 0);
        init(context, attributeSet);
    }


    private void init(Context context, AttributeSet attributeSet) {
        setOrientation(VERTICAL);
        inflate(context, R.layout.category_button_layout, this);
        mCount = DEFAULT_COUNT_TEXT;
        mContext = context;
        mImageView = (ImageView) findViewById(R.id.iv_category_button);
        mTitleTextView = (TextView) findViewById(R.id.tv_category_button_title);
        mCountTextView = (TextView) findViewById(R.id.tv_category_button_count);
        if (attributeSet == null) {
            return;
        }
        TypedArray typedArray = context.obtainStyledAttributes(attributeSet, R.styleable.CategoryButton);
        try {
            setTitleText(typedArray.getString(R.styleable.CategoryButton_category_text));
            setImageView(typedArray.getDrawable(R.styleable.CategoryButton_category_image));
            setCountText(mCount);
        } catch (Exception e) {
            LogUtils.e(TAG, "error :" + e.toString());