// Path: SmartSelectionList/slideselection/src/main/java/com/hkm/slideselection/StyleUtil.java
// public class StyleUtil {
// 
//     public static int resolveDimension(Context context, @AttrRes int attr, @DimenRes int fallbackRes) {
//         TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
//         try {
//             return a.getDimensionPixelSize(0,
//                     (int) context.getResources().getDimension(fallbackRes));
//         } finally {
//             a.recycle();
//         }
//     }
// 
//     @ColorInt
//     public static int resolveColor(Context context, @AttrRes int attr, int fallback) {
//         TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
//         try {
//             return a.getColor(0, fallback);
//         } finally {
//             a.recycle();
//         }
//     }
// 
//     public static int resolveInt(Context context, @AttrRes int attr, int fallback) {
//         TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
//         try {
//             return a.getInt(0, fallback);
//         } finally {
//             a.recycle();
//         }
//     }
// 
//     public static String resolveString(Context context, @AttrRes int attr) {
//         TypedValue v = new TypedValue();
//         context.getTheme().resolveAttribute(attr, v, true);
//         return (String) v.string;
//     }
// 
//     public static int resolveResId(Context context, @AttrRes int attr, int fallback) {
//         TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
//         try {
//             return a.getResourceId(0, fallback);
//         } finally {
//             a.recycle();
//         }
//     }
// 
// }


import android.content.Context;
import android.content.res.TypedArray;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.hkm.slideselection.R;
import com.hkm.slideselection.StyleUtil;
package com.hkm.slideselection.search;



/**
 * Created by hesk on 8/10/15.
 */
public class SearchBar implements TextView.OnEditorActionListener, TextWatcher {
    private RelativeLayout container;
    private EditText mEditText;
    private onEnterQuery enter;
    private ImageButton searchButton;
    private TextView mPlaceHolder;
    private onEnterQuery mQuery;
    private Context mContext;
    private boolean enableSearch;

    public SearchBar(View root, onEnterQuery query) {
        this(root);
        mContext = root.getContext();
// Path: SmartSelectionList/slideselection/src/main/java/com/hkm/slideselection/StyleUtil.java
// public class StyleUtil {
// 
//     public static int resolveDimension(Context context, @AttrRes int attr, @DimenRes int fallbackRes) {
//         TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
//         try {
//             return a.getDimensionPixelSize(0,
//                     (int) context.getResources().getDimension(fallbackRes));
//         } finally {
//             a.recycle();
//         }
//     }
// 
//     @ColorInt
//     public static int resolveColor(Context context, @AttrRes int attr, int fallback) {
//         TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
//         try {
//             return a.getColor(0, fallback);
//         } finally {
//             a.recycle();
//         }
//     }
// 
//     public static int resolveInt(Context context, @AttrRes int attr, int fallback) {
//         TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
//         try {
//             return a.getInt(0, fallback);
//         } finally {
//             a.recycle();
//         }
//     }
// 
//     public static String resolveString(Context context, @AttrRes int attr) {
//         TypedValue v = new TypedValue();
//         context.getTheme().resolveAttribute(attr, v, true);
//         return (String) v.string;
//     }
// 
//     public static int resolveResId(Context context, @AttrRes int attr, int fallback) {
//         TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
//         try {
//             return a.getResourceId(0, fallback);
//         } finally {
//             a.recycle();
//         }
//     }
// 
// }


// Path: SmartSelectionList/slideselection/src/main/java/com/hkm/slideselection/search/SearchBar.java
import android.content.Context;
import android.content.res.TypedArray;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.hkm.slideselection.R;
import com.hkm.slideselection.StyleUtil;

package com.hkm.slideselection.search;



/**
 * Created by hesk on 8/10/15.
 */
public class SearchBar implements TextView.OnEditorActionListener, TextWatcher {
    private RelativeLayout container;
    private EditText mEditText;
    private onEnterQuery enter;
    private ImageButton searchButton;
    private TextView mPlaceHolder;
    private onEnterQuery mQuery;
    private Context mContext;
    private boolean enableSearch;

    public SearchBar(View root, onEnterQuery query) {
        this(root);
        mContext = root.getContext();
        String placeholder = StyleUtil.resolveString(mContext, R.attr.selectionsearchbar_placeholder);