// 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/util/Utils.java
// public class Utils {
//     /**
//      * Show Soft Keyboard with new Thread
//      *
//      * @param activity
//      */
//     public static void hideSoftInput(final Activity activity) {
//         if (activity.getCurrentFocus() != null) {
//             new Runnable() {
//                 public void run() {
//                     InputMethodManager imm =
//                             (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
//                     imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
//                 }
//             }.run();
//         }
//     }
// 
//     /**
//      * Hide Soft Keyboard from Dialogs with new Thread
//      *
//      * @param context
//      * @param view
//      */
//     public static void hideSoftInputFrom(final Context context, final View view) {
//         new Runnable() {
//             @Override
//             public void run() {
//                 InputMethodManager imm =
//                         (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
//                 imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
//             }
//         }.run();
//     }
// 
//     /**
//      * Show Soft Keyboard with new Thread
//      *
//      * @param context
//      * @param view
//      */
//     public static void showSoftInput(final Context context, final View view) {
//         new Runnable() {
//             @Override
//             public void run() {
//                 InputMethodManager imm =
//                         (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
//                 imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
//             }
//         }.run();
//     }
// 
//     /**
//      * Finds the layout orientation of the RecyclerView, no matter which LayoutManager is in use.
//      *
//      * @param layoutManager the LayoutManager instance in use by the RV
//      * @return one of {@link OrientationHelper#HORIZONTAL}, {@link OrientationHelper#VERTICAL}
//      */
//     public static int getOrientation(RecyclerView.LayoutManager layoutManager) {
//         if (layoutManager instanceof LinearLayoutManager) {
//             return ((LinearLayoutManager) layoutManager).getOrientation();
//         } else if (layoutManager instanceof StaggeredGridLayoutManager) {
//             return ((StaggeredGridLayoutManager) layoutManager).getOrientation();
//         }
//         return OrientationHelper.HORIZONTAL;
//     }
// }


import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatDialogFragment;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import com.koma.filemanager.R;
import com.koma.filemanager.util.LogUtils;
import com.koma.filemanager.util.Utils;
    }

    public static InputNameDialog newInstance(String title, int position, Fragment fragment) {
        InputNameDialog dialog = new InputNameDialog();
        Bundle args = new Bundle();
        args.putString(ARG_TITLE, title);
        args.putInt(ARG_ITEM_POSITION, position);
        dialog.setArguments(args);
        dialog.setArguments(args);
        dialog.setTargetFragment(fragment, 0);
        return dialog;
    }

    private OnEditItemListener getListener() {
        OnEditItemListener listener = (OnEditItemListener) getTargetFragment();
        if (listener == null) {
            listener = (OnEditItemListener) getActivity();
        }
        return listener;
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        outState.putString(ARG_TITLE, mTitle);
        super.onSaveInstanceState(outState);
    }

    @Override
    public void onStart() {
        super.onStart();
// 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/util/Utils.java
// public class Utils {
//     /**
//      * Show Soft Keyboard with new Thread
//      *
//      * @param activity
//      */
//     public static void hideSoftInput(final Activity activity) {
//         if (activity.getCurrentFocus() != null) {
//             new Runnable() {
//                 public void run() {
//                     InputMethodManager imm =
//                             (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
//                     imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
//                 }
//             }.run();
//         }
//     }
// 
//     /**
//      * Hide Soft Keyboard from Dialogs with new Thread
//      *
//      * @param context
//      * @param view
//      */
//     public static void hideSoftInputFrom(final Context context, final View view) {
//         new Runnable() {
//             @Override
//             public void run() {
//                 InputMethodManager imm =
//                         (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
//                 imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
//             }
//         }.run();
//     }
// 
//     /**
//      * Show Soft Keyboard with new Thread
//      *
//      * @param context
//      * @param view
//      */
//     public static void showSoftInput(final Context context, final View view) {
//         new Runnable() {
//             @Override
//             public void run() {
//                 InputMethodManager imm =
//                         (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
//                 imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
//             }
//         }.run();
//     }
// 
//     /**
//      * Finds the layout orientation of the RecyclerView, no matter which LayoutManager is in use.
//      *
//      * @param layoutManager the LayoutManager instance in use by the RV
//      * @return one of {@link OrientationHelper#HORIZONTAL}, {@link OrientationHelper#VERTICAL}
//      */
//     public static int getOrientation(RecyclerView.LayoutManager layoutManager) {
//         if (layoutManager instanceof LinearLayoutManager) {
//             return ((LinearLayoutManager) layoutManager).getOrientation();
//         } else if (layoutManager instanceof StaggeredGridLayoutManager) {
//             return ((StaggeredGridLayoutManager) layoutManager).getOrientation();
//         }
//         return OrientationHelper.HORIZONTAL;
//     }
// }


// Path: app/src/main/java/com/koma/filemanager/widget/InputNameDialog.java
import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatDialogFragment;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import com.koma.filemanager.R;
import com.koma.filemanager.util.LogUtils;
import com.koma.filemanager.util.Utils;

    }

    public static InputNameDialog newInstance(String title, int position, Fragment fragment) {
        InputNameDialog dialog = new InputNameDialog();
        Bundle args = new Bundle();
        args.putString(ARG_TITLE, title);
        args.putInt(ARG_ITEM_POSITION, position);
        dialog.setArguments(args);
        dialog.setArguments(args);
        dialog.setTargetFragment(fragment, 0);
        return dialog;
    }

    private OnEditItemListener getListener() {
        OnEditItemListener listener = (OnEditItemListener) getTargetFragment();
        if (listener == null) {
            listener = (OnEditItemListener) getActivity();
        }
        return listener;
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        outState.putString(ARG_TITLE, mTitle);
        super.onSaveInstanceState(outState);
    }

    @Override
    public void onStart() {
        super.onStart();
        LogUtils.i(TAG, "start");