public static ArrayList<HashMap<String, String>> parseJSON(Context context, String jsonString ) {
ArrayList<HashMap<String, String>> rtn = new ArrayList<HashMap<String, String>>();

try {
JSONArray array = new JSONArray("[" + jsonString + "]");

for( int i = 0; i < array.length(); i++ ) {
HashMap<String, String> map = new HashMap<String, String>();

JSONObject object = array.getJSONObject(i);
Iterator<?> keys = object.keys();

while(keys.hasNext()) {
String key = (String) keys.next();
String val = object.getString(key);

map.put(key, val);
}

rtn.add(i, map);

map = null;
}
} catch (JSONException e) {
e.printStackTrace();
}

return rtn;
}

JSonString 포맷이 대괄호가 없을 경우 붙여주고 대괄호가 있을 경우 지우고 사용하세요


'android' 카테고리의 다른 글

앱 이름 가져오기  (0) 2019.04.08
버전 정보 가져오기  (0) 2019.04.08
안드로이드 UI 라이브러리 모음  (0) 2019.03.05
setDisplayShowCustomEnabled 뒤로 가기 색상 변경  (0) 2018.10.30
VectorDrawable를 Bitmap로 변환  (0) 2018.03.07

https://github.com/wasabeef/awesome-android-ui

'android' 카테고리의 다른 글

버전 정보 가져오기  (0) 2019.04.08
JSON String 파싱하기  (0) 2019.03.20
setDisplayShowCustomEnabled 뒤로 가기 색상 변경  (0) 2018.10.30
VectorDrawable를 Bitmap로 변환  (0) 2018.03.07
pendingIntent Flag 옵션  (1) 2018.02.02


public static boolean
isIntegerNumeric(String s) {
try {
Integer.parseInt(s);
return true;
} catch(NumberFormatException e) {
return false;
}
}


public static boolean isDoubleNumeric(String s) {
try {
Double.parseDouble(s);
return true;
} catch(NumberFormatException e) {
return false;
}
}


public static boolean isFloatNumeric(String s) {
try {
Float.parseFloat(s);
return true;
} catch(NumberFormatException e) {
return false;
}
}


활용 방법


if (isIntegerNumeric(String) == false) {
logger.info("숫자만 입력 가능");
}


http://findfun.tistory.com/category/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/jQuery

출처: https://hee-kkk.tistory.com/13 [개발, 개발 누가 말했나]
http://findfun.tistory.com/category/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/jQuery

출처: https://hee-kkk.tistory.com/13 [개발, 개발 누가 말했나]
http://findfun.tistory.com/category/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/jQuery

출처: https://hee-kkk.tistory.com/13 [개발, 개발 누가 말했나]
http://findfun.tistory.com/category/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/jQuery

출처: https://hee-kkk.tistory.com/13 [개발, 개발 누가 말했나]
http://findfun.tistory.com/category/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/jQuery

출처: https://hee-kkk.tistory.com/13 [개발, 개발 누가 말했나]
http://findfun.tistory.com/category/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/jQuery

출처: https://hee-kkk.tistory.com/13 [개발, 개발 누가 말했나]

https://findfun.tistory.com/category/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/jQuery

<item name="android:textColorSecondary">@color/white</item>


'android' 카테고리의 다른 글

JSON String 파싱하기  (0) 2019.03.20
안드로이드 UI 라이브러리 모음  (0) 2019.03.05
VectorDrawable를 Bitmap로 변환  (0) 2018.03.07
pendingIntent Flag 옵션  (1) 2018.02.02
TextView 선택 복사  (0) 2018.01.19

UIView.transition(with: yourView,

              duration: 0.5,  /* 애니메이션 실행 시간 */

              options: .transitionCrossDissolve, /* 애니메이션 옵션 */

              animations: { self.imageView.image = newImage },

              completion: nil)





'swift' 카테고리의 다른 글

실행지연  (0) 2018.05.18
swift 버전 확인  (0) 2018.03.29
UITextField password  (0) 2018.03.21
UiTextField only english  (0) 2018.03.21
UiButton 이벤트 적용  (0) 2018.03.21

// seconds에 초 만큼 실행지연

DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(1), execute: {

  YourCode

})

'swift' 카테고리의 다른 글

View 애니메이션  (1) 2018.05.18
swift 버전 확인  (0) 2018.03.29
UITextField password  (0) 2018.03.21
UiTextField only english  (0) 2018.03.21
UiButton 이벤트 적용  (0) 2018.03.21

터미널에 xcrun swift -version

'swift' 카테고리의 다른 글

View 애니메이션  (1) 2018.05.18
실행지연  (0) 2018.05.18
UITextField password  (0) 2018.03.21
UiTextField only english  (0) 2018.03.21
UiButton 이벤트 적용  (0) 2018.03.21

UITextField.isSecureTextEntry = true

'swift' 카테고리의 다른 글

실행지연  (0) 2018.05.18
swift 버전 확인  (0) 2018.03.29
UiTextField only english  (0) 2018.03.21
UiButton 이벤트 적용  (0) 2018.03.21
UITextview 스크롤 최상위 부터 보기  (0) 2018.03.21

UITextField.keyboardType = .asciiCapable

'swift' 카테고리의 다른 글

swift 버전 확인  (0) 2018.03.29
UITextField password  (0) 2018.03.21
UiButton 이벤트 적용  (0) 2018.03.21
UITextview 스크롤 최상위 부터 보기  (0) 2018.03.21
textField border style none, textField font 크기 변경  (0) 2018.03.13

+ Recent posts