Develop
2013.04.23 16:32
[android] ArrayAdapter 테스트 파일 ㅎㅎ
조회 수 45246 댓글 0
ArrayAdapter 샘플 코드
public class ArrayAdapterTest2 extends ListActivity { ArrayList<String> aList = new ArrayList<String>(); public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); for(int i=0; i<100; i++){ aList.add("haha"+i); } ArrayAdapter<String> aA = new ArrayAdapter<String>(this, R.layout.list_item, aList); setListAdapter(aA); ListView lv = getListView(); lv.setTextFilterEnabled(true); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // When clicked, show a toast with the TextView text Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show(); } }); } }
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
1113 | Develop | [php] 쉘에서 실행할 때 인수(파라미터) 받기.. | hooni | 2003.04.23 | 11599 |
1112 | Develop | [js] 자바스크립트로 응용프로그램 실행 ㅎㅎ | hooni | 2003.04.23 | 9814 |
1111 | Develop | [php] URL/URI 관련 환경변수 | hooni | 2003.04.23 | 9164 |
1110 | Develop | [js] 쿠키(cookie)에 대한 설명과 예제.. | hooni | 2003.04.23 | 8322 |
1109 | Develop | [js] 스크롤을 포함한 마우스 위치 찾는 코드 | hooni | 2003.04.23 | 8507 |
1108 | Develop | [c] pcap을 이용한 패킷 분석 ㅎㅎ | hooni | 2003.04.23 | 10212 |
1107 | Develop | [linux] 쉘 스크립트를 이용한 BBS | hooni | 2003.04.23 | 10049 |
1106 | Develop | [unix] 쉘 스크립트 예제 모음 | hooni | 2003.04.23 | 14951 |
1105 | System/OS | [linux] vi 편집기 간단한 명령과 환경설정 | hooni | 2003.04.23 | 11362 |
1104 | System/OS | [linux] 리눅스 활용 팁^^ | hooni | 2003.04.23 | 14632 |
1103 | System/OS | [linux] 기본 명령어 (내공쌓기) | hooni | 2003.04.23 | 14335 |
1102 | System/OS | [linux] 간단한 vi편집기 사용 명령 | hooni | 2003.04.23 | 13460 |