本文整理汇总了Java中com.hyphenate.easeui.adapter.EaseContactAdapter类的典型用法代码示例。如果您正苦于以下问题:Java EaseContactAdapter类的具体用法?Java EaseContactAdapter怎么用?Java EaseContactAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EaseContactAdapter类属于com.hyphenate.easeui.adapter包,在下文中一共展示了EaseContactAdapter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.hyphenate.easeui.adapter.EaseContactAdapter; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.em_activity_pick_contact_no_checkbox);
listView = (ListView) findViewById(R.id.list);
sidebar = (EaseSidebar) findViewById(R.id.sidebar);
sidebar.setListView(listView);
contactList = new ArrayList<EaseUser>();
// get contactlist
getContactList();
// set adapter
contactAdapter = new EaseContactAdapter(this, R.layout.ease_row_contact, contactList);
listView.setAdapter(contactAdapter);
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
onListItemClick(position);
}
});
}
示例2: init
import com.hyphenate.easeui.adapter.EaseContactAdapter; //导入依赖的package包/类
public void init(List<EaseUser> contactList){
this.contactList = contactList;
adapter = new EaseContactAdapter(context, 0, new ArrayList<EaseUser>(contactList));
adapter.setPrimaryColor(primaryColor).setPrimarySize(primarySize).setInitialLetterBg(initialLetterBg)
.setInitialLetterColor(initialLetterColor);
listView.setAdapter(adapter);
if(showSiderBar){
sidebar.setListView(listView);
}
}