Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 23rd, 2012  |  syntax: None  |  size: 0.60 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public View getView(final int position, View convertView, ViewGroup parent) {
  2.         if (convertView == null) {
  3.                 convertView = mInflater.inflate(R.layout.tweet_listitem, null);
  4.         }
  5.  
  6.         Tweet tweet = getItem(position);
  7.  
  8.         TextView txtvText = (TextView) convertView.findViewById(R.id.txtvText);
  9.         txtvText.setText(tweet.getText());
  10.  
  11.         TextView txtvCreatedAt = (TextView) convertView.findViewById(R.id.txtvCreatedAt);
  12.         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm");
  13.         String dateString = simpleDateFormat.format(tweet.getCreatedAt());
  14.         txtvCreatedAt.setText(dateString);
  15.  
  16.         return convertView;
  17. }