본문 바로가기

프로그래밍119

ListView의 ListItem Touch 막기 ListView를 사용시,public class ListAdapter extends BaseAdapter { private LayoutInflater mInflater; public ListAdapter(Context context) { mInflater = LayoutInflater.from(context); }... (중략) @Override public View getView(int position, View convertView, ViewGroup parent) { int resource = R.layout.list_item; convertView = (LinearLayout) mInflater.inflate(resource, null); convertView.setOnTouchListener(n.. 2013. 5. 22.
getBaseContext()와 getApplicationContext()의 차이 getBaseContext()와 getApplicationContext()의 차이 - getBaseContext() : Activity와 관련되었을 때 사용 - getApplicationContext() : Service와 관련되었을 때 사용 2013. 5. 14.
Cursor의 메서드 목록 Cursor의 메서드 목록 메서드 설명 close 결과셋을 닫는다 getColumnCount 컬럼의 개수를 구한다 getColumnIndex 이름으로부터 컬럼 번호를 구한다 getColumnName 번호로부터 컬럼 이름을 구한다 getCount 결과셋의 레코드 개수를 구한다 getInt 컬럼값을 정수로 구한다 인수로 컬럼 번호를 전달한다 getDouble 컬럼값을 실수로 구한다 getString 컬럼값을 문자열로 구한다 moveToFirst 첫 레코드 위치로 이동한다 결과셋이 비어 있으면 false를 리턴한다 moveToLast 마지막 레코드 위치로 이동한다 결과셋이 비어 있으면 false를 리턴한다 moveToNext 다음 레코드 위치로 이동한다 마지막 레코드이면 false를 리턴한다 moveToPre.. 2013. 4. 22.
URI, String 변환 URI, String 변환 URI uri; String string; string = uri.toString(); uri = URI.parse(string); 2013. 4. 21.
SlidingMenu, ActionBarSherlock 사용시 유의점 SlidingMenu, ActionBarSherlock 사용시 유의점 (SlidingMenu의 Library는 LibrarySlidingMenu, ActionBarSherlock의 Library는 LibraryABS로 임의로 명명) Library와 SampleSource import 후... 1. LibrarySlidingMenu - SlidingMapActivity.java - Project Build Path - Google APIs로 변경 (이유는 Map을 사용하기 때문) 2. Library Project는 Project Build Path에 Is Library에 체크, 그냥 Project면 체크해제 3. Project파일의 libs에 android-support-v4.jar가 중복된다면 하나만 남.. 2013. 4. 3.