use of com.juns.wechat.adpter.ContactAdapter in project wechat by motianhuo.
the class Fragment_Friends method initData.
private void initData() {
if (GloableParams.UserInfos != null) {
lvContact.setAdapter(new ContactAdapter(getActivity(), GloableParams.UserInfos));
} else {
FinalDb db = FinalDb.create(getActivity(), Constants.DB_NAME, false);
GloableParams.UserInfos = db.findAllByWhere(User.class, "type='N'");
lvContact.setAdapter(new ContactAdapter(getActivity(), GloableParams.UserInfos));
for (User user : GloableParams.UserInfos) {
GloableParams.Users.put(user.getTelephone(), user);
}
// Intent intent = new Intent(getActivity(), UpdateService.class);
// getActivity().startService(intent);
}
}
use of com.juns.wechat.adpter.ContactAdapter in project wechat by motianhuo.
the class PublishUserListActivity method initView.
@Override
protected void initView() {
mWindowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
lvContact = (ListView) findViewById(R.id.lvContact);
mDialogText = (TextView) LayoutInflater.from(this).inflate(R.layout.list_position, null);
mDialogText.setVisibility(View.INVISIBLE);
indexBar = (SideBar) findViewById(R.id.sideBar);
indexBar.setListView(lvContact);
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.TYPE_APPLICATION, WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT);
mWindowManager.addView(mDialogText, lp);
indexBar.setTextView(mDialogText);
View layout_head = getLayoutInflater().inflate(R.layout.layout_head_search, null);
lvContact.addHeaderView(layout_head);
lvContact.setAdapter(new ContactAdapter(this, GloableParams.UserInfos));
}
Aggregations