use of com.chrishoekstra.trello.vo.BoardVO in project Trello-Android by chrisHoekstra.
the class BoardAdapter method getView.
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
TextView nameText;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.board_row, null);
nameText = (TextView) convertView.findViewById(R.id.name);
convertView.setTag(R.id.name, nameText);
} else {
nameText = (TextView) convertView.getTag(R.id.name);
}
BoardVO board = mBoards.get(position);
if (board != null) {
nameText.setText(board.name);
}
return convertView;
}
use of com.chrishoekstra.trello.vo.BoardVO in project Trello-Android by chrisHoekstra.
the class TrelloService method getAllBoards.
public ArrayList<BoardVO> getAllBoards() {
ArrayList<BoardVO> result = null;
ArrayList<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();
params.add(new BasicNameValuePair("key", PUBLIC_KEY));
params.add(new BasicNameValuePair("token", mToken));
HttpGet httpGet = new HttpGet(TRELLO_API_URL + "members/" + "me/" + "boards/" + "all?" + URLEncodedUtils.format(params, "UTF-8"));
HttpClient httpClient = getHttpClient();
try {
httpGet.setHeader("Accept", "application/json, text/javascript, */*; q=0.01");
httpClient.getParams().setParameter(CoreProtocolPNames.USER_AGENT, USER_AGENT_STRING);
HttpResponse response = httpClient.execute(httpGet, mContext);
if (response != null) {
result = mObjectMapper.readValue(mJsonFactory.createJsonParser(new InputStreamReader(response.getEntity().getContent(), "UTF-8")), new TypeReference<ArrayList<BoardVO>>() {
});
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
Aggregations