각 연락처와 연관된 imageURL 문자열을 가진 많은 "연락처"개체가 있습니다. ListView에 이미지를 넣는 방법은 수동으로 이미지를 "드로어 블"폴더에 넣고 리소스를 호출하는 방법이 있습니다. 수동으로 이미지를 입력하면이 목적을 무효화합니다. 내 getView 메소드를 제공했고 주석 처리 된 라인은 혼란 스럽다.Android ImageView - URL에서 이미지로드
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.single_row, parent, false);
TextView name = (TextView) row.findViewById(R.id.topLine);
TextView phone = (TextView) row.findViewById(R.id.secondLine);
ImageView icon = (ImageView) row.findViewById(R.id.icon);
name.setText(contactArray.get(position).getName());
phone.setText((CharSequence) contactArray.get(position).getPhone().getWorkPhone());
//icon.setImage from contactArray.get(position).getImageURL(); ????
return row;
}
파일 프로젝트의 Manifest.xml에 다음과 같은 권한을 추가하는 것을 잊지 마십시오. 고마워, 내가 정확히 찾고 있었던거야. – tryp
나는 android dev에 익숙하다. 어디에 mafnifest xml에이 줄을 넣을까요? –