안드로이드 파일경로 설명과 사용하는 법...
2016. 3. 16. 11:37
Android
블로그 여기저기 찾아 다니다가 어느분께서 잘~ 정리해 놓으셨길래...퍼왔음...출처는 여기 : http://bspfp.pe.kr/376 본문내용======================================================================================================BS가 간단한 어플리케이션을 만들고 있는데요. 설정 파일이나, 커스터마이징 파일등을 어디에 저장할지 몰라 좀 찾아 봤습니다. 안드로이드를 사용하는 스마트폰, 태블릿 등을 보면 아이폰과 달리 파티션이 나뉘어 있는데요. 내부 저장소와 외부 저장소로 나뉘어 있고 내부 저장소에는 어플리케이션과 데이터 일부가 저장되고 외부 저장소에는 데이터가 저장되도록 되어 있습니다. 물론 어플리케이션 개발자..
TableLayout의 Row를 LayoutInflater 이용하기...
2016. 3. 13. 19:02
Android
방금 삽질을 했는데...ㅡㅡ;;;;TableLayout의 tablerow를 LayoutInflater한번 사용해서 해볼라고 했는데 ListView에서 처럼 하니까 안되더라...You must call removeView() on the child's parent first. 에러만 열심히 내고...왜일까? 왜일까? 한참을 고민을 했는데 가만 생각해보니...tablerow는 다른 view과 좀 depth가 다르다 tablerow는 parentview로 tablelayout을 가지지만 또 childview를 가지게 된다...그래서 혹시나...해서 LayoutInflater로 xml을 호출 하는 부분에 parentview인 tablelayout을 넘겨줬더니 똬~~~ @.@ 된다...ㅡㅡ;;;;View v = ..
앱 안에서 인증문자 인식하기 및 자동 입력하기...
2016. 2. 29. 14:45
Android
public void getSMS(){ final String ACTION = "android.provider.Telephony.SMS_RECEIVED"; IntentFilter filter = new IntentFilter(); filter.setPriority(999); // 우선순위를 높여서 문자를 가장 먼저 인식한다. filter.addAction(ACTION); //브로드캐스트 생성 mBroadcastReceiver = new BroadcastReceiver(){ @Override public void onReceive(Context context, Intent intent){ if (intent.getAction().equals(ACTION)){ Bundle bundle = intent.get..
EditText에 입력한 텍스트 영어+숫자+특수문자 유효성 체크
2016. 2. 29. 14:30
Android
public boolean textValidate(String str) { String Passwrod_PATTERN = "^(?=.*[a-zA-Z]+)(?=.*[0-9]+).{1,6}$"; Pattern pattern = Pattern.compile(Passwrod_PATTERN); Matcher matcher = pattern.matcher(str); return matcher.matches(); }비밀번호 체크 할때 영어+숫자+특수문자 혼합해서 6 ~ 18자 사이 비밀번호를 체크 하는 로직이다.정규식을 사용해서 패턴 체크를 하고 있음...
앱 종료 시점알기, 앱종료인지 아니면 Activity끼리 전환인지 구분
2016. 2. 27. 15:36
Android
public static boolean isApplicationSentToBackground(final Context context) { ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List tasks = am.getRunningTasks(1); if (!tasks.isEmpty()) { ComponentName topActivity = tasks.get(0).topActivity; if (!topActivity.getPackageName().equals(context.getPackageName())) { return true; } } return false; } onPause()를 오버..