Array Adapter v List Test 1 2 Array

  • Slides: 46
Download presentation

Array. Adapter v List. Test (1 / 2)

Array. Adapter v List. Test (1 / 2)

Array. Adapter v List. Test (2 / 2)

Array. Adapter v List. Test (2 / 2)

Array. Adapter v 실행결과

Array. Adapter v 실행결과

List. View v List. Test 2 (1 / 3)

List. View v List. Test 2 (1 / 3)

List. View v List. Test 2 (2 / 3)

List. View v List. Test 2 (2 / 3)

List. View v List. Test 2 (3 / 3)

List. View v List. Test 2 (3 / 3)

List. View v 실행결과

List. View v 실행결과

List. View – 복수 항목 삭제 v List. Test 4 (1 / 2)

List. View – 복수 항목 삭제 v List. Test 4 (1 / 2)

List. View – 복수 항목 삭제 v List. Test 4 (2 / 2)

List. View – 복수 항목 삭제 v List. Test 4 (2 / 2)

List. View – Custom Layout v List. Test 5 (1 / 8)

List. View – Custom Layout v List. Test 5 (1 / 8)

List. View – Custom Layout v List. Test 5 (2 / 8)

List. View – Custom Layout v List. Test 5 (2 / 8)

List. View – Custom Layout v List. Test 5 (3 / 8)

List. View – Custom Layout v List. Test 5 (3 / 8)

List. View – Custom Layout v List. Test 5 (4 / 8)

List. View – Custom Layout v List. Test 5 (4 / 8)

List. View – Custom Layout v List. Test 5 (5 / 8)

List. View – Custom Layout v List. Test 5 (5 / 8)

List. View – Custom Layout v List. Test 5 (6 / 8)

List. View – Custom Layout v List. Test 5 (6 / 8)

List. View – Custom Layout v List. Test 5 (7 / 8)

List. View – Custom Layout v List. Test 5 (7 / 8)

List. View – Custom Layout v List. Test 5 (8 / 8)

List. View – Custom Layout v List. Test 5 (8 / 8)

Over. Scroll v List. View. set. Over. Scroll. Mode(List. View. OVER_SCROLL_ALWAYS); v List. View.

Over. Scroll v List. View. set. Over. Scroll. Mode(List. View. OVER_SCROLL_ALWAYS); v List. View. set. Over. Scroll. Mode(List. View. OVER_SCROLL_NEVER); v List. View. set. Over. Scroll. Mode(List. View. OVER_SCROLL_IF_CONTENT_SCROLLS);

Spinner v Spinner 예제 - 스피너 자체에 simple_spinner_item 레이아웃 지정. 드롭다운 팝업에 simple_spinner_dropdown_item 레이아웃

Spinner v Spinner 예제 - 스피너 자체에 simple_spinner_item 레이아웃 지정. 드롭다운 팝업에 simple_spinner_dropdown_item 레이아웃 지정. - 이 두 조합이 가장 일반적 리스너에서 선택이 바뀔 때 사용자가 선택한 과일 이름을 토스트로 출력 Main. Activity. java public class Main. Activity extends Activity { Array. Adapter adspin; public void on. Create(Bundle saved. Instance. State) { super. on. Create(saved. Instance. State); set. Content. View(R. layout. activity_main); Spinner spin = (Spinner)find. View. By. Id(R. id. myspinner); spin. set. Prompt("과일을 고르세요. "); adspin = Array. Adapter. create. From. Resource(this, R. array. fruits, android. R. layout. simple_spinner_item); adspin. set. Drop. Down. View. Resource(android. R. layout. simple_spinner_dropdown_item); spin. set. Adapter(adspin); spin. set. On. Item. Selected. Listener(new On. Item. Selected. Listener() { public void on. Item. Selected(Adapter. View parent, View viiew, int position, long id) { Toast. make. Text(Main. Activity. this, adspin. get. Item(position) + "는 맛있다. ", Toast. LENGTH_SHORT). show(); } public void on. Nothing. Selected(Adapter. View parent) {} }); } }

Spinner v 실행결과

Spinner v 실행결과