Search in sources :

Example 1 with FromContactAdapter

use of com.juns.wechat.adpter.FromContactAdapter in project wechat by motianhuo.

the class AddFromContactActivity method initView.

@Override
protected void initView() {
    getLoadingDialog("正在获取联系人").show();
    String str_contact = Utils.getValue(this, Constants.ContactMsg);
    RequestParams params = new RequestParams();
    params.put("userlist", str_contact);
    netClient.post(Constants.getContactFriendURL, params, new BaseJsonRes() {

        @Override
        public void onMySuccess(String data) {
            List<User> UserInfos = JSON.parseArray(data, User.class);
            mlistview.setAdapter(new FromContactAdapter(AddFromContactActivity.this, UserInfos));
            getLoadingDialog("正在获取联系人").dismiss();
        }

        @Override
        public void onMyFailure() {
            // TODO Auto-generated method stub
            getLoadingDialog("正在获取联系人").dismiss();
        }
    });
}
Also used : User(com.juns.wechat.bean.User) FromContactAdapter(com.juns.wechat.adpter.FromContactAdapter) List(java.util.List) RequestParams(com.juns.health.net.loopj.android.http.RequestParams) BaseJsonRes(com.juns.wechat.net.BaseJsonRes)

Aggregations

RequestParams (com.juns.health.net.loopj.android.http.RequestParams)1 FromContactAdapter (com.juns.wechat.adpter.FromContactAdapter)1 User (com.juns.wechat.bean.User)1 BaseJsonRes (com.juns.wechat.net.BaseJsonRes)1 List (java.util.List)1