이렇게하면 페이지가로드 될 때 내 화면이 표시됩니다. 그러나 목록을 스크롤하기 시작하면 모든 기록이 변경되기 시작하고 정말 이상하게 보입니다. 나는 왜, 왜 어떤 제안을 모르겠다? 내가 위아래로 내 ListView
을 스크롤 한 후 ListView는 스크롤하는 동안 레코드를 변경합니다.
이
는 화면입니다.어댑터 :
private class TechnicalDocumentationAdapter extends
ArrayAdapter<TechnicalDocumentation> {
private ArrayList<TechnicalDocumentation> items;
public TechnicalDocumentationAdapter(Context context,
int textViewResourceId, ArrayList<TechnicalDocumentation> items) {
super(context, textViewResourceId, items);
this.items = items;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.technicaldocumentationrow, null);
}
TechnicalDocumentation technicalDocumentation = items.get(position);
if (technicalDocumentation != null) {
TextView tt = (TextView) v.findViewById(R.id.TDRdate);
TextView bt = (TextView) v.findViewById(R.id.TDRobjectTypeCode);
TextView ct = (TextView) v
.findViewById(R.id.TDRperformedAction);
TextView at = (TextView) v.findViewById(R.id.TDRobjectName);
tt.setText(tt.getText() + "\n " + technicalDocumentation.date);
bt.setText(bt.getText() + "\n "
+ technicalDocumentation.objectTypeCode);
ct.setText(ct.getText() + "\n "
+ technicalDocumentation.performedAction);
at.setText(at.getText() + "\n "
+ technicalDocumentation.objectName);
}
return v;
}
}
어댑터를 게시하십시오. –