use of com.lingtuan.firefly.adapter.MessageEventAdapter in project SmartMesh_Android by SmartMeshFoundation.
the class MainMessageFragmentUI method initView.
private void initView() {
IntentFilter filter1 = new IntentFilter();
// Update language refresh the page
filter1.addAction(Constants.CHANGE_LANGUAGE);
getActivity().registerReceiver(mBroadcastReceiver, filter1);
mBack = (ImageView) view.findViewById(R.id.app_back);
mTitle = (TextView) view.findViewById(R.id.app_title);
emptyRela = (RelativeLayout) view.findViewById(R.id.empty_like_rela);
emptyIcon = (ImageView) view.findViewById(R.id.empty_like_icon);
emptyTextView = (TextView) view.findViewById(R.id.empty_text);
mRightBtn = (ImageView) view.findViewById(R.id.detail_set);
mRightBtn.setImageResource(R.drawable.icon_home_more);
mRightBtn.setVisibility(View.VISIBLE);
uploadRegisterInfo = (TextView) view.findViewById(R.id.uploadRegisterInfo);
mListView = (ListView) view.findViewById(R.id.msg_event_list);
mList = new ArrayList<>();
mAdapter = new MessageEventAdapter(mList, getActivity());
mListView.setAdapter(mAdapter);
if (uploadRegisterInfo != null) {
if (NextApplication.myInfo == null || TextUtils.isEmpty(NextApplication.myInfo.getMid())) {
uploadRegisterInfo.setVisibility(View.VISIBLE);
} else {
uploadRegisterInfo.setVisibility(View.GONE);
}
}
}
use of com.lingtuan.firefly.adapter.MessageEventAdapter in project SmartMesh_Android by SmartMeshFoundation.
the class ContactSelectedUI method initData.
@Override
protected void initData() {
setTitle(getString(R.string.chatting_selected_title));
// -1 default 0 close 1 open
int openSmartMesh = MySharedPrefs.readInt1(NextApplication.mContext, MySharedPrefs.FILE_USER, MySharedPrefs.KEY_NO_NETWORK_COMMUNICATION + NextApplication.myInfo.getLocalId());
if (openSmartMesh == -1) {
bindService(new Intent(this, AppNetService.class), serviceConn, Activity.BIND_AUTO_CREATE);
}
if (getIntent() != null) {
msgList = (ArrayList<ChatMsg>) getIntent().getSerializableExtra("msglist");
if (msgList != null && msgList.size() >= 0) {
if (!TextUtils.isEmpty(msgList.get(0).getForwardLeaveMsg())) {
linkTitle = msgList.get(0).getForwardLeaveMsg();
}
}
}
mListView.addHeaderView(headerView);
mAdapter = new MessageEventAdapter(null, this);
mListView.setAdapter(mAdapter);
new Thread(new UpdateMessage()).start();
}
Aggregations