본문 바로가기
안드로이드

edittext 에 null또는 공백체크

by Siang's 2019. 3. 19.
반응형
TextUtils.isEmpty(edittext)



     public static boolean isEmpty(@Nullable CharSequence str) {
        if (str == null || str.length() == 0)
            return true;
        else
            return false;
    }
반응형

'안드로이드' 카테고리의 다른 글

DialogRadio  (0) 2019.03.20
깜빡이기  (0) 2019.03.19
edittext 에 null또는 공백체크  (0) 2019.03.19
textview 현재 글자색 가져오기  (0) 2019.03.19
editText 커서위치 마지막으로 보내기  (0) 2019.03.18