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


Java AjaxStatus.NETWORK_ERROR属性代码示例

本文整理汇总了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));
	}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:32,代码来源:ShowXiangqingTv.java

示例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());
	}
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:33,代码来源:ShowXiangqingTv.java

示例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());
	}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:13,代码来源:ShowShoucangHistoryActivity.java

示例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);
		}
	}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:30,代码来源:ShowXiangqingDongman.java

示例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());
	}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:12,代码来源:HistoryActivity.java

示例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());
	}
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:37,代码来源:ShowXiangqingMovie.java

示例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);
	}
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:32,代码来源:ShowXiangqingMovie.java

示例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;
	}
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:30,代码来源:VideoPlayerJPActivity.java

示例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));
	}

}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:32,代码来源:VideoPlayerJPActivity.java

示例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));
		}
	}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:29,代码来源:VideoPlayerJPActivity.java


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