/** 加载本地数据(已从服务器下载到本地),切换到当前tab时触发 */ public void reloadChange(boolean rebuild) { if (adapter == null) { if (getActivity() == null) { return; } initAdapter(); } adapter.load(rebuild); }
private void findViews() { View ctCountView = View.inflate(getView().getContext(), R.layout.nim_contacts_count_item, null); countView = (TextView) ctCountView.findViewById(R.id.contactCountText); loadingFrame = findView(R.id.contact_loading_frame); initAdapter(); listView = findView(R.id.contact_list_view); ctCountView.setClickable(false); listView.getRefreshableView().addFooterView(ctCountView); listView.setAdapter(adapter); listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true)); ContactItemClickListener listener = new ContactItemClickListener(); listView.setOnItemClickListener(listener); listView.setOnItemLongClickListener(listener); }