Develop
2013.04.23 16:32
[android] ArrayAdapter 테스트 파일 ㅎㅎ
조회 수 46285 댓글 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(); } }); } }
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
73 | System/OS | [linux] 프로그램 설치방법 (내공쌓기) | hooni | 2003.04.23 | 14240 |
72 | System/OS | [linux] 간단한 vi편집기 사용 명령 | hooni | 2003.04.23 | 14378 |
71 | System/OS | [linux] 기본 명령어 (내공쌓기) | hooni | 2003.04.23 | 15282 |
70 | System/OS | [linux] 리눅스 활용 팁^^ | hooni | 2003.04.23 | 15541 |
69 | System/OS | [linux] vi 편집기 간단한 명령과 환경설정 | hooni | 2003.04.23 | 12159 |
68 | Develop | [unix] 쉘 스크립트 예제 모음 | hooni | 2003.04.23 | 17975 |
67 | Develop | [linux] 쉘 스크립트를 이용한 BBS | hooni | 2003.04.23 | 11399 |
66 | Develop | [c] pcap을 이용한 패킷 분석 ㅎㅎ | hooni | 2003.04.23 | 11570 |
65 | Develop | [js] 스크롤을 포함한 마우스 위치 찾는 코드 | hooni | 2003.04.23 | 9723 |
64 | Develop | [js] 쿠키(cookie)에 대한 설명과 예제.. | hooni | 2003.04.23 | 9837 |
63 | Develop | [php] URL/URI 관련 환경변수 | hooni | 2003.04.23 | 10422 |
62 | Develop | [js] 자바스크립트로 응용프로그램 실행 ㅎㅎ | hooni | 2003.04.23 | 11675 |