private void getMyAccountMessage() {
HttpUtils<NetResponse<SettingBean>> waitHandler = new HttpUtils<>(getActivity());
waitHandler.param("action", NetConfig.ACTION_getcusdhinfo)
.param("uid", PreferencesConfig.FPassword.get())
.get(new CallBack<NetResponse<SettingBean>>() {
@Override
public void onSuccess(NetResponse<SettingBean> res) {
for (SettingBean.TableBean tableBean : res.FObject.getTable()) {
tvMyRealname.setText(tableBean.getFRealName());
return;
}
if (null != res.FObject.getTable() && res.FObject.getTable().size() > 0) {
tvMyRealname.setText(res.FObject.getTable().get(0).getFRealName());
tvMyBond.setText(res.FObject.getTable().get(0).getFBail());
tvMyLevel.setText(res.FObject.getTable().get(0).getFGradeName());
tvMySignDay.setText(res.FObject.getTable().get(0).getFSignEndDate());
tvMyOrderNoPay.setText(res.FObject.getTable().get(0).getOrderNum1());
tvMyOrderNoSend.setText(res.FObject.getTable().get(0).getOrderNum2());
tvMyOrderNoReceived.setText(res.FObject.getTable().get(0).getOrderNum3());
tvMyOrderComplete.setText(res.FObject.getTable().get(0).getOrderNum4());
}
}
});
}
list的两种循环,因为接口只有一条数据,建议第二种.