Buggy code:
public class MessageListAdapter extends BaseAdapter { private MessageFragment messageFragment ; private List < GotyeChatTarget > sessions ; private GotyeAPI api ; public MessageListAdapter ( MessageFragment messageFragment , List < GotyeChatTarget > sessions ) { } static class ViewHolder { ImageView icon ; TextView title ; TextView content ; TextView time ; TextView count ; } @ Override public int getCount ( ) { } @ Override public GotyeChatTarget getItem ( int arg0 ) { } @ Override public long getItemId ( int arg0 ) { } @ Override public int getViewTypeCount ( ) { } @ Override public int getItemViewType ( int position ) { } @ SuppressLint ( "NewApi" ) @ Override public View getView ( int arg0 , View view , ViewGroup arg2 ) { MessageListAdapter . ViewHolder viewHolder ; if ( view == null ) { view = LayoutInflater . from ( messageFragment . getActivity ( ) ) . inflate ( item_delete , null ) ; viewHolder = new MessageListAdapter . ViewHolder ( ) ; viewHolder . icon = ( ( ImageView ) ( view . findViewById ( icon ) ) ) ; viewHolder . title = ( ( TextView ) ( view . findViewById ( title_tx ) ) ) ; viewHolder . content = ( ( TextView ) ( view . findViewById ( content_tx ) ) ) ; viewHolder . time = ( ( TextView ) ( view . findViewById ( time_tx ) ) ) ; viewHolder . count = ( ( TextView ) ( view . findViewById ( count ) ) ) ; view . setTag ( viewHolder ) ; } else { viewHolder = ( ( MessageListAdapter . ViewHolder ) ( view . getTag ( ) ) ) ; } final GotyeChatTarget session = getItem ( arg0 ) ; Log . d ( "offLine" , ( "session" + session ) ) ; if ( ( getItemViewType ( arg0 ) ) == 0 ) { <START_BUG> viewHolder . title . setText ( session . name ) ; <END_BUG> viewHolder . content . setVisibility ( GONE ) ; viewHolder . icon . setImageResource ( message ) ; viewHolder . time . setVisibility ( GONE ) ; int count = api . getUnreadNotifyCount ( ) ; if ( count > 0 ) { viewHolder . count . setVisibility ( VISIBLE ) ; viewHolder . count . setText ( String . valueOf ( count ) ) ; } else { viewHolder . count . setVisibility ( GONE ) ; } } else { String title = "" ; String content = "" ; viewHolder . content . setVisibility ( VISIBLE ) ; GotyeMessage lastMsg = api . getLastMessage ( session ) ; String lastMsgTime = TimeUtil . dateToMessageTime ( ( ( lastMsg . getDate ( ) ) * 1000 ) ) ; viewHolder . time . setText ( lastMsgTime ) ; setIcon ( viewHolder . icon , session ) ; if ( ( lastMsg . getType ( ) ) == ( GotyeMessageType . GotyeMessageTypeText ) ) { content = "文本消息：" + ( lastMsg . getText ( ) ) ; } else if ( ( lastMsg . getType ( ) ) == ( GotyeMessageType . GotyeMessageTypeImage ) ) { content = "图片消息" ; } else if ( ( lastMsg . getType ( ) ) == ( GotyeMessageType . GotyeMessageTypeAudio ) ) { content = "语音消息" ; } else if ( ( lastMsg . getType ( ) ) == ( GotyeMessageType . GotyeMessageTypeUserData ) ) { content = "自定义消息" ; } else if ( ( lastMsg . getType ( ) ) == ( GotyeMessageType . GotyeMessageTypeInviteGroup ) ) { content = "邀请消息" ; } if ( ( session . type ) == ( GotyeChatTargetType . GotyeChatTargetTypeUser ) ) { GotyeUser user = api . requestUserInfo ( session . name , false ) ; if ( user != null ) { if ( TextUtils . isEmpty ( user . getNickname ( ) ) ) { title = "好友：" + ( user . name ) ; } else { title = "好友：" + ( user . getNickname ( ) ) ; } } else { title = "好友：" + ( session . name ) ; } } else if ( ( session . type ) == ( GotyeChatTargetType . GotyeChatTargetTypeRoom ) ) { GotyeRoom room = api . requestRoomInfo ( session . Id , false ) ; if ( room != null ) { if ( TextUtils . isEmpty ( room . getRoomName ( ) ) ) { title = "聊天室：" + ( room . Id ) ; } else { title = "聊天室：" + ( room . getRoomName ( ) ) ; } } else { title = "聊天室：" + ( session . Id ) ; } } else if ( ( session . type ) == ( GotyeChatTargetType . GotyeChatTargetTypeGroup ) ) { GotyeGroup group = api . requestGroupInfo ( session . Id , false ) ; if ( group != null ) { if ( TextUtils . isEmpty ( group . getGroupName ( ) ) ) { title = "群：" + ( group . Id ) ; } else { title = "群：" + ( group . getGroupName ( ) ) ; } } else { title = "群：" + ( session . Id ) ; } } viewHolder . title . setText ( title ) ; viewHolder . content . setText ( content ) ; int count = api . getUnreadMsgcounts ( session ) ; if ( count > 0 ) { viewHolder . count . setVisibility ( VISIBLE ) ; viewHolder . count . setText ( String . valueOf ( count ) ) ; } else { viewHolder . count . setVisibility ( GONE ) ; } } return view ; } private void setIcon ( ImageView imgView , GotyeChatTarget target ) { } public void setData ( List < GotyeChatTarget > sessions ) { } }

Fix:
viewHolder . title . setText ( "验证消息" ) ;