private void initViews() { conversationList.addAll(loadConversationsWithRecentChat()); if (conversationList != null && conversationList.size() > 0) { layout.findViewById(R.id.txt_nochat).setVisibility(View.GONE); adpter = new NewMsgAdpter(getActivity(), conversationList); // TODO 加载订阅号信息 ,增加一个Item // if (GloableParams.isHasPulicMsg) { EMConversation nee = new EMConversation("100000"); conversationList.add(0, nee); String time = Utils.getValue(getActivity(), "Time"); String content = Utils.getValue(getActivity(), "Content"); time = "下午 02:45"; content = "[腾讯娱乐] 赵薇炒股日赚74亿"; PublicMsgInfo msgInfo = new PublicMsgInfo(); msgInfo.setContent(content); msgInfo.setMsg_ID("12"); msgInfo.setTime(time); adpter.setPublicMsg(msgInfo); // } lvContact.setAdapter(adpter); } else { layout.findViewById(R.id.txt_nochat).setVisibility(View.VISIBLE); } }