我有從XML佈局創建的自定義ListView。我想將它綁定到我的自定義數據類。 如何將該類轉換爲ListAdapter並將佈局綁定到ListView。類的代碼如下:Android ListView綁定到自定義類
public class Sessions {
private int status;
private List<Session> sessions;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public List<Session> getSessions() {
return sessions;
}
public void setSessions(List<Session> sessions) {
this.sessions = sessions;
}
public static class Session {
public Boolean active;
public String contributor_covu_id;
public String created_at;
public String key;
public String status;
public String name;
public String type;
};
}