
Untitled
By: a guest on
May 23rd, 2012 | syntax:
None | size: 0.60 KB | hits: 11 | expires: Never
public View getView(final int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = mInflater.inflate(R.layout.tweet_listitem, null);
}
Tweet tweet = getItem(position);
TextView txtvText = (TextView) convertView.findViewById(R.id.txtvText);
txtvText.setText(tweet.getText());
TextView txtvCreatedAt = (TextView) convertView.findViewById(R.id.txtvCreatedAt);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm");
String dateString = simpleDateFormat.format(tweet.getCreatedAt());
txtvCreatedAt.setText(dateString);
return convertView;
}