Android의 ListView로 SimplecursOradapter를 설정하는 방법은 무엇입니까?

StackOverflow https://stackoverflow.com/questions/2264986

  •  20-09-2019
  •  | 
  •  

문제

SimplecursOradapter를 ListView로 설정해야합니다.

어떻게 달성 할 수 있습니까?

감사해요.

도움이 되었습니까?

해결책

이 질문은 약간 모호하기 때문에 간단히 대답하려는 유혹이 있습니다.

my_list_view.setAdapter(my_cursor_adapter);

그러나 문서에는 더 나은 설명과 예가 있습니다. 여기에 하나가 있습니다 :

http://developer.android.com/resources/samples/apidemos/src/com/example/android/apis/view/list2.html

다른 팁

목록보기 방법은 다음과 같이 deflard를 가지고 있습니다.

public void setAdapter (ListAdapter adapter)

그리고 문서 ListAdapter 기울기 단순한 쿠커스 라도프 자체 간접 하위 클래스 중 하나로. 그래서 당신을 설정합니다 단순한 쿠커스 드래프터 a 목록보기, 당신은 전화 만 있으면됩니다 setAdapter 어댑터와 함께.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top