本文整理汇总了Java中com.androidquery.callback.AjaxStatus.NETWORK_ERROR属性的典型用法代码示例。如果您正苦于以下问题:Java AjaxStatus.NETWORK_ERROR属性的具体用法?Java AjaxStatus.NETWORK_ERROR怎么用?Java AjaxStatus.NETWORK_ERROR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.androidquery.callback.AjaxStatus
的用法示例。
在下文中一共展示了AjaxStatus.NETWORK_ERROR属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initYingpingServiceData
public void initYingpingServiceData(String url, JSONObject json,
AjaxStatus status) {
// TODO Auto-generated method stub
if (status.getCode() == AjaxStatus.NETWORK_ERROR) {
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
return;
}
if (json == null || json.equals(""))
return;
String str = json.toString();
if(str.contains("review_id")) {
isYingPing = true;
}
Log.i(TAG, "isYingPing--->" + isYingPing + " --->" + str);
if(!isYingPing) {
yingpingBt.setEnabled(false);
yingpingBt.setBackgroundResource(R.drawable.yingping_button_unuse_selector);
yingpingBt.setTextColor(getResources().getColor(R.color.unuse_color));
// yingpingBt.setFocusable(false);
}
getGroupSeries(URLUtils.getGroupSeries(prod_id));
}
示例2: initIsShoucangData
public void initIsShoucangData(String url, JSONObject json, AjaxStatus status){
xiaiBt.setEnabled(true);
if (status.getCode() == AjaxStatus.NETWORK_ERROR||json == null) {
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
return;
}
if(json == null || json.equals(""))
return;
Log.d(TAG, "data = " + json.toString());
String flag = json.toString();
if(!flag.equals("")) {
if(flag.contains("true")) {
isXiai = true;
ItemStateUtils.shoucangButtonToFocusState(xiaiBt, getApplicationContext());
} else {
isXiai = false;
ItemStateUtils.shoucangButtonToNormalState(xiaiBt, getApplicationContext());
}
} else {
isXiai = true;
ItemStateUtils.shoucangButtonToFocusState(xiaiBt, getApplicationContext());
}
}
示例3: deleteResult
public void deleteResult(String url, JSONObject json, AjaxStatus status){
if (status.getCode() == AjaxStatus.NETWORK_ERROR) {
// aq.id(R.id.ProgressText).invisible();
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
return;
}
if(json == null || json.equals(""))
return;
Log.d(TAG, json.toString());
}
示例4: initYingpingServiceData
public void initYingpingServiceData(String url, JSONObject json,
AjaxStatus status) {
// TODO Auto-generated method stub
if (status.getCode() == AjaxStatus.NETWORK_ERROR) {
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
return;
}
if (json == null || json.equals(""))
return;
String str = json.toString();
if(str.contains("review_id")) {
isYingPing = true;
}
Log.i(TAG, "isYingPing--->" + yingpingBt);
if(!isYingPing) {
yingpingBt.setEnabled(false);
yingpingBt.setBackgroundResource(R.drawable.yingping_button_unuse_selector);
yingpingBt.setTextColor(getResources().getColor(R.color.unuse_color));
// yingpingBt.setFocusable(false);
}
}
示例5: deleteResult
public void deleteResult(String url, JSONObject json, AjaxStatus status){
if (status.getCode() == AjaxStatus.NETWORK_ERROR) {
// aq.id(R.id.ProgressText).invisible();
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
return;
}
if(json == null || json.equals(""))
return;
Log.d(TAG, json.toString());
}
示例6: initIsShoucangData
public void initIsShoucangData(String url, JSONObject json,
AjaxStatus status) {
xiaiBt.setEnabled(true);
if (status.getCode() == AjaxStatus.NETWORK_ERROR || json == null) {
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
return;
}
if (json == null || json.equals(""))
return;
Log.d(TAG, "data = " + json.toString());
String flag = json.toString();
if (!flag.equals("")) {
if (flag.contains("true")) {
isXiai = true;
ItemStateUtils.shoucangButtonToFocusState(xiaiBt,
getApplicationContext());
} else {
isXiai = false;
ItemStateUtils.shoucangButtonToNormalState(xiaiBt,
getApplicationContext());
}
} else {
isXiai = true;
ItemStateUtils.shoucangButtonToFocusState(xiaiBt,
getApplicationContext());
}
}
示例7: initYingpingServiceData
public void initYingpingServiceData(String url, JSONObject json,
AjaxStatus status) {
// TODO Auto-generated method stub
if (status.getCode() == AjaxStatus.NETWORK_ERROR) {
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
return;
}
if (json == null || json.equals(""))
return;
String str = json.toString();
if (str.contains("review_id")) {
isYingPing = true;
}
Log.i(TAG, "isYingPing--->" + isYingPing + " --->" + str);
if (!isYingPing) {
yingpingBt.setEnabled(false);
yingpingBt
.setBackgroundResource(R.drawable.yingping_button_unuse_selector);
yingpingBt.setTextColor(getResources()
.getColor(R.color.unuse_color));
// yingpingBt.setFocusable(false);
}
}
示例8: initIsShoucangData
public void initIsShoucangData(String url, JSONObject json,
AjaxStatus status) {
if (status.getCode() == AjaxStatus.NETWORK_ERROR || json == null) {
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
return;
}
if (json == null || json.equals(""))
return;
Log.d(TAG, "data = " + json.toString());
String flag = json.toString();
if (!flag.equals("")) {
if (flag.contains("true")) {
isShoucang = true;
} else {
isShoucang = false;
}
} else {
isShoucang = true;
}
}
示例9: favorityResult
public void favorityResult(String url, JSONObject json,
AjaxStatus status) {
if (json != null) {
try {
// woof is "00000",now "20024",by yyc
if (json.getString("res_code").trim().equalsIgnoreCase("00000")) {
app.MyToast(this, "收藏成功!");
isShoucang = true;
mBottomButton.setBackgroundResource(R.drawable.player_btn_unfav);
} else {
isShoucang = true;
mBottomButton.setBackgroundResource(R.drawable.player_btn_unfav);
app.MyToast(this, "已收藏!");
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
// ajax error, show error code
if (status.getCode() == AjaxStatus.NETWORK_ERROR)
app.MyToast(aq.getContext(),
getResources().getString(R.string.networknotwork));
}
}
示例10: unfavorityResult
public void unfavorityResult(String url, JSONObject json, AjaxStatus status) {
if (json != null) {
try {
if (json.getString("res_code").trim().equalsIgnoreCase("00000")) {
app.MyToast(this, "取消收藏成功!");
mBottomButton
.setBackgroundResource(R.drawable.player_btn_fav);
isShoucang = false;
// setResult(JieMianConstant.SHOUCANG_CANCEL);
} else {
app.MyToast(this, "取消收藏失败!");
isShoucang = true;
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
// ajax error, show error code
if (status.getCode() == AjaxStatus.NETWORK_ERROR)
app.MyToast(this,
getResources().getString(R.string.networknotwork));
}
}