안녕하세요 사용자 정의 확장형 목록보기를 만들려고하는데 어댑터의 설명서가 매우 혼란스럽고 다양합니다. 평소와 같이 json 배열을 읽는 hashmap을 가지고 목록에 넣습니다. 각 자식 그룹은 마지막 위치의 "GRUPO"키에있는 동일한 배열 내에서 전송됩니다. 누군가가 나를이 어댑터 구현을 줄 수 있습니까? json으로에서 아래의 코드는 다음과 같습니다확장형 목록보기 android json
if (tipopergunta.contentEquals("BOOLEANO") || tipopergunta.contentEquals("ESCMULTIPLA") || tipopergunta.contentEquals("ESCUNICA")){
HashMap<String,String> childdados = new HashMap<String,String>();
childdados.put("GRUPO", "Dados");
childdados.put("TIPOPERGUNTA", tipopergunta);
childdados.put("PERGUNTA", pergunta);
childdados.put("BREVEDESIGNACAO", brevedesc);
childdados.put("ESTADO",estado);
childdados.put("INSTRUCOES",instrucoes);
childdados.put("IDPERGUNTA",idpergunta);
Log.d("childdados",""+childdados.toString());
list.add(childdados);
}
if (tipopergunta.contentEquals("OPINIAO")){
HashMap<String,String> childdados = new HashMap<String,String>();
childdados.put("GRUPO", "Opinião");
childdados.put("TIPOPERGUNTA", tipopergunta);
childdados.put("PERGUNTA", pergunta);
childdados.put("BREVEDESIGNACAO", brevedesc);
childdados.put("ESTADO",estado);
childdados.put("INSTRUCOES",instrucoes);
childdados.put("IDPERGUNTA",idpergunta);
Log.d("opiniaolist",childdados.toString());
list.add(childdados);
}
if (tipopergunta.contentEquals("FOTOGRAFIA")){
HashMap<String,String> childdados = new HashMap<String,String>();
childdados.put("GRUPO", "Fotografia");
childdados.put("TIPOPERGUNTA", tipopergunta);
childdados.put("PERGUNTA", pergunta);
childdados.put("BREVEDESIGNACAO", brevedesc);
childdados.put("ESTADO",estado);
childdados.put("INSTRUCOES",instrucoes);
childdados.put("IDPERGUNTA",idpergunta);
Log.d("fotolist",childdados.toString());
list.add(childdados);
}
아직도 이해할 수없는 것 같습니다. ican 여기에 내가 이미지 어댑터에서 얻는 무엇을 넣어, 나는 어떻게 어댑터에 그것을 구현하는 방법을 모르겠다. – user1437481
나는 각 방법을 설명하려고 노력했다. 그것이 당신을 돕는 지보십시오. –