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


Java CommonResponse.isSuccess方法代码示例

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


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

示例1: 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

示例2: loadData

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

示例3: 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,代码来源:InfoAttentionActivity.java

示例4: loadFriendData

import com.core.CommonResponse; //导入方法依赖的package包/类
private void loadFriendData(CommonResponse resposne) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        QueryContactFriendsResult result = (QueryContactFriendsResult) resposne.getData();
        contacts = result.getRelton();

        for (int i = 0; i < mContacts.size(); i++) {
            if (contacts.contains(mContacts.get(i))) {
                if (contacts.get(contacts.indexOf(mContacts.get(i))).getUserinfo() == null) {
                    contacts.set(contacts.indexOf(mContacts.get(i)), mContacts.get(i));
                } else {
                    continue;
                }
            }
        }

        hanziSequence();
        mAdapter.refresh(contacts);
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }
    ptflistview.onRefreshComplete();
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:24,代码来源:InviteContactsActivity.java

示例5: 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,代码来源:RegisterActivity.java

示例6: loadData

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

示例7: loadData

import com.core.CommonResponse; //导入方法依赖的package包/类
/**
 * @param resposne
 */
private void loadData(CommonResponse resposne) {
    if (resposne.isSuccess()) {
        CommonUtil.showToast(mContext, "邀请已发送");
    } else {
        CommonUtil.showToast(mContext, resposne.getErrorTip());
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:11,代码来源:ContactFriendListHeadersAdapter.java

示例8: loadBalance

import com.core.CommonResponse; //导入方法依赖的package包/类
private void loadBalance(CommonResponse resposne) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        AccountResult result = (AccountResult) resposne.getData();
        balance_et.setText(result.getAccount().getUavail() + "金币");
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:10,代码来源:InfoRewardActivity.java

示例9: loadDataDetail

import com.core.CommonResponse; //导入方法依赖的package包/类
private void loadDataDetail(CommonResponse resposne) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        infoDetailResult = (InvInfoDetailResult) resposne.getData();
        initData();
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:10,代码来源:InfoDetailActivity.java

示例10: loadDataJoin

import com.core.CommonResponse; //导入方法依赖的package包/类
private void loadDataJoin(CommonResponse resposne) {
    if (resposne.isSuccess()) {
        InvActJoinResult result = (InvActJoinResult) resposne.getData();
        sign_num_tv.setText("已报名 " + result.getJionNum());
        initGridView(result.getJoinUsers());
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:10,代码来源:ActDetailActivity.java

示例11: loadData

import com.core.CommonResponse; //导入方法依赖的package包/类
/**
 * 数据返回
 *
 * @param resposne
 */
private void loadData(CommonResponse resposne, int what) {
    mContext.dialogDismiss();
    CommonUtil.showToast(resposne.getMsg());
    if (resposne.isSuccess()) {
        setHabitView(habitView, what);
    }
}
 
开发者ID:tengbinlive,项目名称:aibao_demo,代码行数:13,代码来源:HabitAdapter.java

示例12: deleteComplete

import com.core.CommonResponse; //导入方法依赖的package包/类
private void deleteComplete(CommonResponse resposne) {
    if (resposne.isSuccess()) {
        OpenApiSimpleResult result = (OpenApiSimpleResult) resposne.getData();

        for (int i = 0; i < checkedItems.size(); i++) {
            int item = checkedItems.get(i);
            mList.remove(item);
        }
        mAdapter.refresh(mList);
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }

}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:15,代码来源:CollectedInvActFragment.java

示例13: loadLoginData

import com.core.CommonResponse; //导入方法依赖的package包/类
/**
 * 处理登陆数据
 *
 * @param resposne
 */
private void loadLoginData(CommonResponse resposne) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        SharedPreferencesHelper.setString(this, Constant.LoginUser.SHARED_PREFERENCES_PHONE, phoneNum);
        LoginResult result = (LoginResult) resposne.getData();
        UserInfo userInfo = result.getUsinfo();
        String userJson = JSON.toJSONString(userInfo);
        SharedPreferencesHelper.setString(this, Constant.LoginUser.SHARED_PREFERENCES_USER, userJson);
        App.getInstance().setgUserInfo(result.getUsinfo());
        toMainActivity();
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:20,代码来源:RegisterNextActivity.java

示例14: loadDataSign

import com.core.CommonResponse; //导入方法依赖的package包/类
private void loadDataSign(CommonResponse resposne) {
    if (resposne.isSuccess()) {
        list.get(currentIndex).setIsJoin(InvActBean.STATUS_BY);
        notifyDataSetChanged();
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:9,代码来源:CollectedInvActAdapter.java

示例15: loadBalance

import com.core.CommonResponse; //导入方法依赖的package包/类
private void loadBalance(CommonResponse resposne) {
    dialogDismiss();
    if (resposne.isSuccess()) {
        AccountResult result = (AccountResult) resposne.getData();
        initView(result.getAccount());
    } else {
        CommonUtil.showToast(resposne.getErrorTip());
    }
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:10,代码来源:UserWalletActivity.java


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