Develop
2013.04.23 16:32
[android] ArrayAdapter 테스트 파일 ㅎㅎ
조회 수 45242 댓글 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(); } }); } }
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
817 | Develop | [ios] SBCampanion App 초안 | hooni | 2015.09.16 | 660 |
816 | Develop | [ios] WWDC 2015 샘플 소스 코드 통합파일 | hooni | 2015.07.20 | 665 |
815 | Develop | [ios] Touch ID 적용 샘플 코드 (예제) | hooni | 2015.02.23 | 673 |
814 | Develop | [ios] 여러 버전의 Xcode 사용하기 | hooni | 2022.05.28 | 675 |
813 | Develop | Aspect Oriented Programming in Objective-C | hooni | 2015.05.18 | 676 |
812 | Develop | 정리할 자료. | hooni | 2015.07.02 | 679 |
811 | Develop | [swift] 실행시간 측정하기 | hooni | 2021.09.14 | 680 |
810 | Develop | [js] Text 값을 클립보드에 복사하기 | hooni | 2020.10.10 | 682 |
809 | Develop | [matlab] 정보은닉 스테가노그래피(Steganography) 수업 | hooni | 2016.10.03 | 686 |
808 | Develop | [ios] 비디오,네트워크,소셜로그인 테스트 | hooni | 2017.04.04 | 694 |
807 | Develop | [android] Android N requires the IDE to be running with Java 1.8 or later 오류 | hooni | 2016.08.30 | 695 |
806 | Develop | [Javascript][Ajax] 자바스크립트 강의 산출물 | hooni | 2019.10.05 | 707 |