Develop
2013.04.23 16:32
[android] ArrayAdapter 테스트 파일 ㅎㅎ
조회 수 45237 댓글 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 | 642 |
816 | Develop | [ios] WWDC 2015 샘플 소스 코드 통합파일 | hooni | 2015.07.20 | 648 |
815 | Develop | [swift] 실행시간 측정하기 | hooni | 2021.09.14 | 651 |
814 | Develop | [ios] Touch ID 적용 샘플 코드 (예제) | hooni | 2015.02.23 | 652 |
813 | Develop | [ios] NSNotificationCenter 초간단 사용 예~ ㅋㄷ | hooni | 2015.06.26 | 652 |
812 | Develop | [js] Text 값을 클립보드에 복사하기 | hooni | 2020.10.10 | 663 |
811 | Develop | [matlab] 정보은닉 스테가노그래피(Steganography) 수업 | hooni | 2016.10.03 | 669 |
810 | Develop | Aspect Oriented Programming in Objective-C | hooni | 2015.05.18 | 672 |
809 | Develop | [ios] 비디오,네트워크,소셜로그인 테스트 | hooni | 2017.04.04 | 672 |
808 | Develop | 정리할 자료. | hooni | 2015.07.02 | 673 |
807 | Develop | [android] Android N requires the IDE to be running with Java 1.8 or later 오류 | hooni | 2016.08.30 | 673 |
806 | Develop | [Javascript][Ajax] 자바스크립트 강의 산출물 | hooni | 2019.10.05 | 686 |