//ScrollView 와 ViewPager간의 Touch interference 보호를 한 리스너mViewPager = (ViewPager)findViewById(R.id.프래그먼트ID); mViewPager.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { v.getParent().requestDisallowInterceptTouchEvent(true); return false; } }); ///////////////////////////////////////////////////////////////////////////////
Intent로 다른 Activity(예, AnotherActivity.class)를 실행시킬 때는 다음과 같이 한다. Intent intent = new Intent(getApplicationContext(), AnotherActivity.class);startActivity(intent);그런데, 여기에 추가로 AnotherActivity 데이터를 전달하고 싶을 때가 있다.이때 사용할 수 있는 것이 putExtra() 다. Intent intent = new Intent(getApplicationContext(), AnotherActivity.class);intent.putExtra(“name”, “rio”);intent.putExtra(“age”, 10);startActivity(intent); 그리..
유효성 검사이메일public static boolean isEmail(String email) {if (email==null) return false;boolean b = Pattern.matches(“[\\w\\~\\-\\.]+@[\\w\\~\\-]+(\\.[\\w\\~\\-]+)+”,email.trim());return b;} 휴대폰public static boolean isValidCellPhoneNumber(String cellphoneNumber) {boolean returnValue = false;Log.i(“cell”, cellphoneNumber);String regex = “^\\s*(010|011|012|013|014|015|016|017|018|019)(-|\\)|\\s)*(\\d{3..
onCreate()는 Activity가 최초 생성할 때 호출됩니다. 초기화 설정을 하는 곳으로 보관된 상태의 Activity가 있으면, 그 상태를 저장중인 Bundle객체를 받아서 사용합니다. onCreate()가 호출된 후에는 onStart()가 호출되는데 이 때에는 강제종료가 불가능합니다. onRestart()는 Activity가 정지된 후(onStop() 후) 다시 시작하기 전에 호출됩니다. onRestart()가 호출된 후에는 onStart()가 호출되는데 이 때에는 강제종료가 불가능합니다. onStart()는 Activity가 사용자에게 보여지기 직전에 호출됩니다. Activity화면을 표시하는 매소드입니다. 이후, onResume()으로 이어집니다. 이 때에는 강제종료가 불가능합니다. onRe..
- Total
- Today
- Yesterday
- 클래스
- nsis
- UTF-8
- synchronized
- 라이브러리
- 안드로이드
- Server
- Delete
- spring
- mysql
- Controller
- iNT
- 하기
- 연결
- 자바
- 스프링
- java
- 사용
- 종류
- Default
- Create
- js
- Class
- mybatis
- jdbc
- jsp
- Android
- 생성
- 음식
- 어노테이션
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |