当前位置: 首页>>代码示例>>Java>>正文


Java CommonResponse类代码示例

本文整理汇总了Java中com.core.CommonResponse的典型用法代码示例。如果您正苦于以下问题:Java CommonResponse类的具体用法?Java CommonResponse怎么用?Java CommonResponse使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CommonResponse类属于com.core包,在下文中一共展示了CommonResponse类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadAgreement

import com.core.CommonResponse; //导入依赖的package包/类
/**
     * 约定
     *
     * @param resposne
     */
    private void loadAgreement(CommonResponse resposne) {
        dialogDismiss();

        // TODO: 16/5/11  TEST
//        if (resposne.isSuccess()) {
        AgreementResult result = (AgreementResult) resposne.getData();
        String testTime = "1447296641255";
        App.getInstance().setAppoint_time(testTime);
        AgreementStateEventType eventType = new AgreementStateEventType(cureentParent.getUid(), AgreementStateEventType.AGREEMENT_ING, null, testTime);
        EventBus.getDefault().postSticky(eventType);
//        } else {
//            sendCount = 0;
//            CommonUtil.showToast(resposne.getMsg());
//        }
    }
 
开发者ID:tengbinlive,项目名称:aibao_demo,代码行数:21,代码来源:AgreementFragment.java

示例2: loadUpdate

import com.core.CommonResponse; //导入依赖的package包/类
private void loadUpdate(CommonResponse resposne) {
    dialogDismiss();
    CommonUtil.showToast(resposne.getMsg());
    if (resposne.isSuccess()) {
        Parent parent = App.getInstance().getUserResult().getParent();
        String name = nameValue.getText().toString();
        String birthday = birthdayValue.getText().toString();
        if (StringUtil.isNotBlank(name)) {
            nameValue.setText("");
            nameValue.setHint(name);
            parent.setAlias(name);
        }
        if (StringUtil.isNotBlank(birthday)) {
            birthdayValue.setText("");
            birthdayValue.setHint(birthday);
            parent.setBirthday(birthdayDate.getTimeInMillis());
        }
        parent.setSex(user_gender);
        App.getInstance().getUserResult().setParent(parent);
        ParentDao dao = App.getDaoSession().getParentDao();
        dao.deleteAll();
        dao.insertInTx(parent);
    }
}
 
开发者ID:tengbinlive,项目名称:aibao_demo,代码行数:25,代码来源:UserFragment.java

示例3: handlerCallBack

import com.core.CommonResponse; //导入依赖的package包/类
@Override
public void handlerCallBack(Message msg) {
    super.handlerCallBack(msg);
    dialogDismiss();
    switch (msg.what) {
        case AUTH_CODE:
            loadAuthCode((CommonResponse) msg.obj);
            break;
        case RESETPASSWORD:
            loadResetPassword((CommonResponse) msg.obj);
            break;
        case LOGIN_DATA:
            loadLogin((CommonResponse) msg.obj);
            break;
        case LOAD_AUTHCODE_FILL:
            String securityCode = msg.obj.toString();
            verification_et.setText(securityCode);
            verification_et.setSelection(securityCode.length());
            break;
        default:
            break;
    }
}
 
开发者ID:tengbinlive,项目名称:aibao_demo,代码行数:24,代码来源:ResetPassWordActivity.java

示例4: loadLogin

import com.core.CommonResponse; //导入依赖的package包/类
private void loadLogin(CommonResponse resposne) {
    if (resposne.isSuccess()) {
        UserResult result = (UserResult) resposne.getData();
        App.getInstance().setUserResult(result);
        ParentDao dao = App.getDaoSession().getParentDao();
        dao.deleteAll();
        dao.insertInTx(result.getParent());
        toMainActivity();
    } else {
        CommonUtil.showToast(resposne.getMsg());
        Intent intent = new Intent(this, LoginActivity.class);
        intent.putExtra("animation_type", AnimatedRectLayout.ANIMATION_WAVE_TR);
        startActivity(intent);
        overridePendingTransition(0, 0);
    }
}
 
开发者ID:tengbinlive,项目名称:aibao_demo,代码行数:17,代码来源:ResetPassWordActivity.java

示例5: handleMessage

import com.core.CommonResponse; //导入依赖的package包/类
public void handleMessage(Message msg) {
    int what = msg.what;
    switch (what) {
        case INIT_LIST:
        case LOAD_DATA:
            loadData((CommonResponse) msg.obj, what);
            break;
        case LOAD_COLLECT:
            loadDataCollect((CommonResponse) msg.obj);
            break;
        case LOAD_DETAIL:
            loadDataDetail((CommonResponse) msg.obj);
            break;
        case LOAD_BUY_INFO:
            loadDataBuyInfo((CommonResponse) msg.obj);
            break;
        default:
            break;
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:21,代码来源:InfoDetailActivity.java

示例6: handleMessage

import com.core.CommonResponse; //导入依赖的package包/类
public void handleMessage(Message msg) {
    dialogDismiss();
    switch (msg.what) {
        case OTHER_DATA:
            loadOtherData((CommonResponse) msg.obj);
            break;
        case FOLLOW_OTHER:
            followOtherData((CommonResponse) msg.obj);
            break;
        case ADD_FRIEND:
            try {
                EMContactManager.getInstance().addContact(otherid, "");
                CommonUtil.showToast("添加好友请求已发送");
            } catch (EaseMobException e) {
                e.printStackTrace();
            } break;
        default:
            break;
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:21,代码来源:UserFansDetailsActivity.java

示例7: handleMessage

import com.core.CommonResponse; //导入依赖的package包/类
public void handleMessage(Message msg) {
    int what = msg.what;
    switch (what) {
        case INIT_LIST:
        case LOAD_DATA:
            loadData((CommonResponse) msg.obj, what);
            break;
        case LOAD_COLLECT:
            loadDataCollect((CommonResponse) msg.obj);
            break;
        case LOAD_DETAIL:
            loadDataDetail((CommonResponse) msg.obj);
            break;
        case LOAD_SIGN:
            loadDataSign((CommonResponse) msg.obj);
            break;
        case LOAD_JOIN:
            loadDataJoin((CommonResponse) msg.obj);
            break;
        default:
            break;
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:24,代码来源:ActDetailActivity.java

示例8: loadData1

import com.core.CommonResponse; //导入依赖的package包/类
private void loadData1(CommonResponse resposne, int what) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        if (what == INIT_LIST) {
            InvOfferListResult result = (InvOfferListResult) resposne.getData();
            mList = result.getRewards();
        } else {
            if (mList == null) {
                mList = new ArrayList<InvOfferBean>();
            }
            mList.addAll(((InvOfferListResult) resposne.getData()).getRewards());
        }
        mAdapter.refresh(mList);
    } else {
        //避免第一次应用启动时 创建fragment加载数据多次提示
        if (isInit) {
            CommonUtil.showToast(resposne.getErrorTip());
        } else {
            isInit = true;
        }
    }
    mListView.onRefreshComplete();
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:24,代码来源:MeOfferRewFragment.java

示例9: loadData

import com.core.CommonResponse; //导入依赖的package包/类
private void loadData(CommonResponse resposne, int what) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        if (what == INIT_LIST) {
            InvInfoResult result = (InvInfoResult) resposne.getData();
            mList = result.getInfos();
        } else {
            if (mList == null) {
                mList = new ArrayList<InvInfoBean>();
            }
            mList.addAll(((InvInfoResult) resposne.getData()).getInfos());
        }
        mAdapter.refresh(mList);
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }
    mListView.onRefreshComplete();
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:19,代码来源:InvInfoFragment.java

示例10: handleMessage

import com.core.CommonResponse; //导入依赖的package包/类
public void handleMessage(Message msg) {
    int what = msg.what;
    switch (what) {
        case INIT_LIST:
        case LOAD_DATA:
            loadData((CommonResponse) msg.obj, what);
            break;
        case LOAD_COLLECT:
            loadDataCollect((CommonResponse) msg.obj);
            break;
        case LOAD_ADOPTION:
            loadDataAdoption((CommonResponse) msg.obj);
            break;
        default:
            break;
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:18,代码来源:OfferDetailActivity.java

示例11: loadData2

import com.core.CommonResponse; //导入依赖的package包/类
private void loadData2(CommonResponse resposne, int what) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        if (what == INIT_LIST) {
            MyPartakeOfferListResult result = (MyPartakeOfferListResult) resposne.getData();
            mList = result.getRetRewards();
        } else {
            if (mList == null) {
                mList = new ArrayList<InvOfferBean>();
            }
            mList.addAll(((MyPartakeOfferListResult) resposne.getData()).getRetRewards());
        }
        mAdapter.refresh(mList);
    } else {
        //避免第一次应用启动时 创建fragment加载数据多次提示
        if (isInit) {
            CommonUtil.showToast(resposne.getErrorTip());
        } else {
            isInit = true;
        }
    }
    mListView.onRefreshComplete();
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:24,代码来源:MeOfferRewPartakeFragment.java

示例12: loadLoginData

import com.core.CommonResponse; //导入依赖的package包/类
/**
     * 处理登陆数据
     *
     * @param resposne
     */
    private void loadLoginData(CommonResponse resposne) {
//        if (resposne.isSuccess()) {
        SharedPreferencesHelper.setString(this, Constant.LoginUser.SHARED_PREFERENCES_PHONE, phone);
        SharedPreferencesHelper.setString(this, Constant.LoginUser.SHARED_PREFERENCES_PASSWORD, password);
        UserInfo userInfo = UserInfo.testData();
        String userJson = JSON.toJSONString(userInfo);
        SharedPreferencesHelper.setString(this, Constant.LoginUser.SHARED_PREFERENCES_USER, userJson);
        App.getInstance().setgUserInfo(userInfo);
        if (!EMChat.getInstance().isLoggedIn()) {
            EASEMOBLogin();
        } else {
            dialogDismiss();
            EMGroupManager.getInstance().loadAllGroups();
            EMChatManager.getInstance().loadAllConversations();
            toMainActivity();
        }
//        } else {
//            dialogDismiss();
//            CommonUtil.showToast(resposne.getErrorTip());
//        }
    }
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:27,代码来源:LoginActivity.java

示例13: handleMessage

import com.core.CommonResponse; //导入依赖的package包/类
public void handleMessage(Message msg) {
    dialogDismiss();
    switch (msg.what) {
        case LOAD_AUTHCODE_FILL:
            String securityCode = msg.obj.toString();
            code_et.setText(securityCode);
            code_et.setSelection(securityCode.length());
            break;
        case AUTH_CODE:
            loadAuthCode((CommonResponse) msg.obj);
            break;
        case RESET_PASSWORD:
            loadResetPassword((CommonResponse) msg.obj);
            break;
        default:
            break;
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:19,代码来源:ResetPasswordActivity.java

示例14: loadData

import com.core.CommonResponse; //导入依赖的package包/类
private void loadData(CommonResponse resposne, int what) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        if (what == INIT_LIST) {
            MyActListResult result  = (MyActListResult) resposne.getData();
            mList = result.getActivitys();
        } else {
            if (mList == null) {
                mList = new ArrayList<InvActBean>();
            }
            mList.addAll(((MyActListResult) resposne.getData()).getActivitys());
        }
        mAdapter.refresh(mList);
    } else {
        //避免第一次应用启动时 创建fragment加载数据多次提示
        if(isInit) {
            CommonUtil.showToast(resposne.getErrorTip());
        }else {
            isInit = true;
        }
    }
    mListView.onRefreshComplete();
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:24,代码来源:MeActivityFragment.java

示例15: loadData

import com.core.CommonResponse; //导入依赖的package包/类
private void loadData(CommonResponse resposne, int what) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        if (what == INIT_LIST) {
            InvOfferListResult result = (InvOfferListResult) resposne.getData();
            mList = result.getRewards();
        } else {
            if (mList == null) {
                mList = new ArrayList<InvOfferBean>();
            }
            mList.addAll(((InvOfferListResult) resposne.getData()).getRewards());
        }
        mAdapter.refresh(mList);
    } else {
        //避免第一次应用启动时 创建fragment加载数据多次提示
        if (isInit) {
            CommonUtil.showToast(resposne.getErrorTip());
        } else {
            isInit = true;
        }
    }
    mListView.onRefreshComplete();
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:24,代码来源:InvOfferFragment.java


注:本文中的com.core.CommonResponse类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。