This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* activity에서 키보드의 등장유무의 콜백을 구현한 클래스. | |
* | |
* @author KangSung-Woo | |
* @since 2016/06/08 | |
*/ | |
public class SoftKeyboardVisiblityChecker { | |
/** | |
* 최소라 생각되는 소프트키보드의 사이즈(pixel) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* StatusBar의 높이를 얻는다. | |
* | |
* @param context Context instance | |
* @return pixel size of Statusbar height or 0 | |
*/ | |
public static int getStatusBarHeight(Context context) { | |
if (context != null) { | |
int statusBarHeightResourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); | |
if (statusBarHeightResourceId > 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* get Aspaect ratio image resize point | |
* | |
* @param src 원본 비트맵 이미지 | |
* @param maxValue 원하는 값 | |
* @return 리사이징된 비트맵의 width, height가 설정된 Point객체 혹은 null | |
*/ | |
public static Point createScaledBitmapSize(Bitmap src, int maxValue) { | |
Point p = null; | |
if (src != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 파일 하나를 복사 한다. AsyncTask등에 태워서 처리 할 것 | |
* | |
* @param from 복사할 파일의 절대 경로 혹은 객체 | |
* @param target 저장할 파일의 경로 혹은 객체 | |
* @param <T> String or File instance | |
* @return true일 경우 파일 복사가 성공적으로 수행 됨. | |
*/ | |
public static <T> boolean fileCopy(T from, T target) { | |
if (from != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This evaluator can be used to perform type interpolation between integer | |
* values that represent ARGB colors. | |
* <p/> | |
* 2015/03/26 강성우 : ArgbEvaluator가 API 21이상 에서만 동작하기 때문에 따로 구현 하였음. | |
*/ | |
public class ArgbEvaluatorCompat implements TypeEvaluator { | |
private static final ArgbEvaluatorCompat sInatance = new ArgbEvaluatorCompat(); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* SWPreferences 클래스 | |
* | |
* @author SungWoo Kang | |
* @since 2015/08/25 | |
*/ | |
public class SWPreferences { | |
// 네이밍 법칙 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ImageUtils | |
* | |
* @author KangSung-Woo | |
* @since 2015/10/23 | |
*/ | |
public class ImageUtils { | |
public static final int DEFAULT_TRANSITION_DRATION = 150; | |
private static final String TAG = ImageUtils.class.getSimpleName(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TextWatcherAdapter | |
implements TextWatcher { | |
private final EditText view; | |
private final TextWatcherListener listener; | |
public TextWatcherAdapter(EditText editText, TextWatcherListener listener) { | |
this.view = editText; | |
this.listener = listener; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ClearableEditText | |
extends EditText | |
implements View.OnTouchListener, View.OnFocusChangeListener, TextWatcherAdapter.TextWatcherListener { | |
public interface OnTextClearedListener { | |
void wasClearedText(); | |
} | |
private Drawable drawables; | |
private OnTextClearedListener textClearedListener; |
NewerOlder