use of com.lingtuan.firefly.contact.adapter.NewContactListAdapter in project SmartMesh_Android by SmartMeshFoundation.
the class MainContactFragmentUI method initView.
private void initView() {
mBack = (ImageView) view.findViewById(R.id.app_back);
mTitle = (TextView) view.findViewById(R.id.app_title);
mNewListView = (ListView) view.findViewById(R.id.contact_list);
uploadRegisterInfo = (TextView) view.findViewById(R.id.uploadRegisterInfo);
uploadRegisterInfo.setOnClickListener(this);
swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipe_container);
swipeLayout.setOnRefreshListener(this);
swipeLayout.setColorSchemeResources(R.color.black);
View headerDiscus = View.inflate(getActivity(), R.layout.include_friends_header_discuss, null);
mNewListView.addHeaderView(headerDiscus);
View footerView = View.inflate(getActivity(), R.layout.include_friends_footer, null);
contactNum = (TextView) footerView.findViewById(R.id.include_contact_num);
mNewListView.addFooterView(footerView);
contactNum.setText(getString(R.string.contact_num, 0));
mNewContactListAdapter = new NewContactListAdapter(getActivity(), R.layout.contact_child_item, mContactList, false);
mNewListView.setAdapter(mNewContactListAdapter);
mNewListView.setOnItemClickListener(this);
mNewListView.setOnItemLongClickListener(this);
// A popwindow click add buddy, etc
mContactAddBtn = (ImageView) view.findViewById(R.id.detail_set);
mContactAddBtn.setImageResource(R.drawable.icon_add_friend);
mContactAddBtn.setVisibility(View.VISIBLE);
contactReceiver = new RefreshContactReceiver();
IntentFilter filter = new IntentFilter(Constants.ACTION_SELECT_CONTACT_REFRESH);
LocalBroadcastManager.getInstance(getActivity()).registerReceiver(contactReceiver, filter);
IntentFilter filter1 = new IntentFilter();
// Update language refresh the page
filter1.addAction(Constants.CHANGE_LANGUAGE);
// Network changes to monitor
filter1.addAction(Constants.ACTION_NETWORK_RECEIVER);
getActivity().registerReceiver(mBroadcastReceiver, filter1);
}
use of com.lingtuan.firefly.contact.adapter.NewContactListAdapter in project SmartMesh_Android by SmartMeshFoundation.
the class SelectContactUI method findViewById.
@Override
protected void findViewById() {
if (getIntent() != null) {
cantSelectList = (ArrayList<String>) getIntent().getSerializableExtra("cantSelectList");
hasSelectList = (ArrayList<UserBaseVo>) getIntent().getSerializableExtra("hasSelectList");
isMultipleChoice = getIntent().getBooleanExtra("isMultipleChoice", false);
}
mTitle = (TextView) findViewById(R.id.app_title);
mTitleRela = (RelativeLayout) findViewById(R.id.app_title_rela);
mNewListView = (ListView) findViewById(R.id.contact_list);
mSelectContactBg = (LinearLayout) findViewById(R.id.contact_select_bg);
mHorizontalScrollView = (HorizontalScrollView) findViewById(R.id.contact_horizontalscrollview);
mHorizontalScrollViewContent = (LinearLayout) findViewById(R.id.contact_horizontalscrollview_content);
mFinishBtn = (TextView) findViewById(R.id.contact_select_finish);
if (isMultipleChoice) {
mSelectContactBg.setVisibility(View.VISIBLE);
}
if (hasSelectList != null) {
mFinishBtn.setEnabled(true);
}
swipeLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_container);
swipeLayout.setColorSchemeResources(R.color.black);
View headerView0 = View.inflate(this, R.layout.include_friends_header_search, null);
initSearchData(headerView0);
mNewListView.addHeaderView(headerView0);
View footerView = View.inflate(this, R.layout.include_friends_footer, null);
contactNum = (TextView) footerView.findViewById(R.id.include_contact_num);
mNewListView.addFooterView(footerView);
contactNum.setText(getString(R.string.contact_num, 0));
mNewContactListAdapter = new NewContactListAdapter(this, R.layout.contact_child_item, mContactList, isMultipleChoice);
mNewListView.setAdapter(mNewContactListAdapter);
}
Aggregations