Esempio n. 1
0
 @Override
 public void handleMessage(Message msg) {
   // TODO Auto-generated method stub
   switch (msg.what) {
     case UPDATE_CONTENT:
       listViewReply.setAdapter(replysAdapter);
       textViewUsername.setText(topic.getUsername());
       textViewReplyTime.setText(topic.getReplyTime());
       textViewContent.setText(Html.fromHtml(topic.getContent(), imgGetter, null));
       textViewNode.setText(topic.getNode());
       textViewClick.setText(topic.getClick());
       textViewReplyCount.setText(topic.getReplyCount() + "条回复");
       textViewTitle.setText(topic.getTitle());
       finalBitmap.display(imageViewAvatar, topic.getAvatar());
       layoutProgress.setVisibility(View.GONE);
       break;
     default:
       super.handleMessage(msg);
       break;
   }
 }
Esempio n. 2
0
 private void init() {
   setTitle(topic.getTitle());
   finalBitmap = FinalBitmap.create(TopicActivity.this);
   LayoutInflater layoutInflater =
       (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
   layoutHeader =
       (LinearLayout) layoutInflater.inflate(R.layout.listview_reply_header, null, false);
   listViewReply = (ListView) findViewById(R.id.listView_reply);
   layoutProgress = (LinearLayout) findViewById(R.id.linearLayout_progress);
   textViewUsername = (TextView) layoutHeader.findViewById(R.id.textView_username);
   textViewReplyTime = (TextView) layoutHeader.findViewById(R.id.textView_reply_time);
   imageViewAvatar = (ImageView) layoutHeader.findViewById(R.id.imageView_avatar);
   textViewContent = (TextView) layoutHeader.findViewById(R.id.textView_content);
   textViewClick = (TextView) layoutHeader.findViewById(R.id.textView_click);
   textViewReplyCount = (TextView) layoutHeader.findViewById(R.id.textView_reply_count);
   textViewTitle = (TextView) layoutHeader.findViewById(R.id.textView_title);
   textViewNode = (TextView) layoutHeader.findViewById(R.id.textView_node);
   listViewReply.addHeaderView(layoutHeader);
   listViewReply.setHeaderDividersEnabled(false);
   listViewReply.setAdapter(replysAdapter);
   textViewContent.setMovementMethod(LinkMovementMethod.getInstance());
 }