Develop
2013.04.23 16:32
[android] ArrayAdapter 테스트 파일 ㅎㅎ
조회 수 45293 댓글 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(); } }); } }
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
57 | System/OS | [ms-sql] 서브스트링(substring), 프로시저(SP) 작성 예제 | hooni | 2013.04.23 | 41394 |
56 | Etc | [용어] POC, Pilot, BMT에 대한 IT 업계에서 통용되는 의미 | hooni | 2014.01.02 | 42048 |
55 | System/OS | [linux] 네트웍 트래픽 모니터링(MRTG) | hooni | 2003.04.23 | 42390 |
54 | Develop | [java] 스트러츠(Struts) 세팅 ㅋㅋ | hooni | 2013.04.23 | 42396 |
53 | Develop | [ios] 미스터피자(Mr.pizza) 어플 | hooni | 2013.04.23 | 42690 |
52 | Develop | [c++] BHO 프로그램 동작 원리.. 간단하게.. | hooni | 2013.04.23 | 43153 |
51 | Develop | [android] 화면 전환(가로/세로)시 설정 | hooni | 2013.04.23 | 43424 |
50 | Develop | [android] ListView+ArrayAdapter 테스트 | hooni | 2013.04.23 | 43955 |
49 | Etc | 스파이웨어(BHO) 탐지하는 방법.. | hooni | 2013.04.23 | 44472 |
» | Develop | [android] ArrayAdapter 테스트 파일 ㅎㅎ | hooni | 2013.04.23 | 45293 |
47 | Develop | [ios] 배열(NSArray) 연산과 간단한 애니메이션(split images) | hooni | 2013.10.31 | 45542 |
46 | Develop | [ios] UIAlertView 초간단 샘플 ㅎㅎ | hooni | 2013.10.14 | 46193 |