마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

custom adapter에 sqlite리스트를 불러오는법좀 알려주세요

0 추천
원래 그냥 listview에다

 sendText = intent.getExtras().getString("score");

 ContentValues cv = new ContentValues();
  cv.put("ppp", sendText);

이렇게 이전 클래스에서 intent로 데이터를받아 db에 저장하고

그걸

String[] cols = new String[] { "ppp" };

SimpleCursorAdapter a = new SimpleCursorAdapter(this,
    android.R.layout.simple_list_item_1, c, cols, views);

이렇게 ppp라는 칼람을 불러왔는데요

 

이걸 listview에다 custom adapter을 붙이고

customadapter내용에다 ppp를 불러오고싶은데

어떻게해야하나요?

 

밑에는 그냥 커스텀아답터만들어서 리스트뷰에 붙인건데요

저상태에다 db를 사용하고싶습니다

  List<CustomSet> csl = new ArrayList<CustomSet>();
  CustomSet cs = new CustomSet();
  cs.setImageView(R.drawable.ic_launcher);
  cs.setPersonName("홍길동");
  cs.setPersonScore("0");
  csl.add(cs);
  CustomAdapter1 ca = new CustomAdapter1(this, R.layout.custom_result,
    csl);
  lv.setAdapter(ca);
호시하 (230 포인트) 님이 2013년 3월 18일 질문

1개의 답변

0 추천
android-sdk-windows-r## -> sample -> android-# -> ApiDemos -> src -> com -> example -> android -> apis -> view -> List7.java
aucd29 (218,390 포인트) 님이 2013년 3월 18일 답변
...