• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AjaxStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onCreate

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.dialog_find_id_input);
    okBtn = (Button)findViewById(R.id.okBtn);
    inputCode = (EditText)findViewById(R.id.input_code);
    aQuery = new AQuery(getApplicationContext());
    params = new HashMap<>();

    okBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            aQuery.ajax("http://52.79.134.200/signin", params, String.class, new AjaxCallback<String>(){
                @Override
                public void callback(String url, String object, AjaxStatus status) {

                }
            });
        }
    });
}
 
开发者ID:JoMingyu,项目名称:Daejeon-People,代码行数:22,代码来源:EntryID.java


示例2: login

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void login() {
    aQuery.ajax(passwd, null, JSONObject.class, new AjaxCallback<JSONObject>() {
        @Override
        public void callback(String url, JSONObject json, AjaxStatus status) {
            String pass = null;
            if (json != null) {
                try {
                    pass = json.getString("password");
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }
            if (status.getCode() == 200 && status.getCode() < 300) {
                if (pass.contentEquals(password)) {
                    facultySubjectMapping = new FacultySubjectMapping(empid, context, sharedPreferences, toast);
                    facultySubjectMapping.run();
                }
            }
        }
    });
}
 
开发者ID:CoepPortal,项目名称:PortalApp,代码行数:22,代码来源:FacultyLogin.java


示例3: expired

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
@Override
public boolean expired(AbstractAjaxCallback<?, ?> cb, AjaxStatus status)
{
	int code = status.getCode();
	if (code == 200)
		return false;
	String error = status.getError();
	if (error != null && error.contains("OAuthException"))
	{
		AQUtility.debug("fb token expired");
		return true;
	}
	String url = cb.getUrl();
	if (code == 400 && (url.endsWith("/likes") || url.endsWith("/comments") || url.endsWith("/checkins")))
	{
		return false;
	}
	if (code == 403 && (url.endsWith("/feed") || url.contains("method=delete")))
	{
		return false;
	}
	return code == 400 || code == 401 || code == 403;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:24,代码来源:FacebookHandle.java


示例4: onAjaxDataResponse

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
@Override
public boolean onAjaxDataResponse(String url, String result, AjaxStatus status)
{
	if (url.endsWith(ApiConfig.USER_LOGIN))
	{
		if (ReturnInfo.isSuccess(GsonTools.getReturnInfo(result)))
		{
			setResult(ConstValues.RESULT_LOGIN_SUCCESS);
			finish();
		}
		else
		{
			setResult(ConstValues.RESULT_LOGIN_ERROR);
		}
	}
	return true;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:18,代码来源:ActivityLogin.java


示例5: onAjaxDataResponse

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
@Override
public boolean onAjaxDataResponse(String url, String result, AjaxStatus status)
{
	if (url.endsWith(ApiConfig.GET_USER_INFO))
	{
		ReturnInfo returnInfo = GsonTools.getReturnInfo(result);
		if (!ReturnInfo.isSuccess(returnInfo))
		{
			ToastView.showCenterToast(mContext, "登录信息已过期,请重新登录!");
			tvName.setText("请登录!");
			setbLogin(false);
		}
		else
		{
			setbLogin(true);
		}
	}
	return true;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:20,代码来源:LayoutSideMain.java


示例6: callback

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
protected static void callback(String url, VIPVideoToken myToken,
                               File target, AjaxStatus status,
                               VideoCache.CacheCallback myCallback) {
    synchronized (queueMap) {
        WeakHashMap<VIPVideoToken, VideoCache.CacheCallback> ivs = queueMap.remove(url);
        videoMap.remove(myToken);

        //check if view queue already contains first view
        if (null == ivs || !ivs.containsKey(myToken)) {
            checkCb(url, myToken, target, status, myCallback);
        }

        if (null != ivs) {
            Set<VIPVideoToken> set = ivs.keySet();
            for (VIPVideoToken token : set) {
                VideoCache.CacheCallback cb = ivs.get(token);
                checkCb(url, token, target, status, cb);
            }
        }
    }
}
 
开发者ID:bblue000,项目名称:ExoPlayerDemo,代码行数:22,代码来源:VideoAjaxCallback.java


示例7: loadImages

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
/**
 * Using AQuery(a helper class) to load status images and store them on
 * sdcard
 */
private void loadImages() {
	if (imageUrlList != null && imageUrlList.size() > 0) {
		for (Map.Entry<String, String> mapEntry : imageUrlList.entrySet()) {
			AQuery aquery = new AQuery(getBaseContext());
			final String idValue = mapEntry.getValue();
			aquery.ajax(mapEntry.getKey(), Bitmap.class,
					new AjaxCallback<Bitmap>() {
						@Override
						public void callback(String url, Bitmap object,
								AjaxStatus status) {
							super.callback(url, object, status);
							Log.i("store images", url);
							storeImages(url, object, idValue);
						}
					});
		}
	}
}
 
开发者ID:laaptu,项目名称:twitterwidget,代码行数:23,代码来源:TwitterService.java


示例8: cancelshoucangResult

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void cancelshoucangResult(String url, JSONObject json, AjaxStatus status){
	
	//闹钟开启的情况下,取消收藏删除数据库中相关数据
	if(UtilTools.is48TimeClock(getApplicationContext()))
		DBUtils.deleteData4ProId(getApplicationContext(), 
			UtilTools.getCurrentUserId(getApplicationContext()), prod_id);
	
	xiaiBt.setEnabled(true);
	
	
		if(favNum - 1 >=0) {
			
			favNum --;
			xiaiBt.setText((favNum) + "");
			ItemStateUtils.shoucangButtonToNormalState(xiaiBt, getApplicationContext());
		}
	isXiai = false;
	
	if(json == null || json.equals("")) 
		return;
	
	Log.d(TAG, "cancel:----->"+json.toString());
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:24,代码来源:ShowXiangqingTv.java


示例9: shoucangResult

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void shoucangResult(String url, JSONObject json, AjaxStatus status){
	xiaiBt.setEnabled(true);
	favNum ++;
	
	xiaiBt.setText(favNum + "");
	ItemStateUtils.shoucangButtonToFocusState(xiaiBt, getApplicationContext());
	isXiai = true;
	
	if(json == null || json.equals("")) 
		return;
	
	Log.d(TAG, "shoucangResult:----->" + json.toString());
	
	HotItemInfo info = new HotItemInfo();
	info.prod_id = prod_id;
	info.prod_name = date.tv.name;
	info.score = date.tv.score;
	info.prod_pic_url = pic_url;
	info.cur_episode = date.tv.cur_episode;
	info.max_episode = date.tv.max_episode;
	info.prod_type = BangDanConstant.TV_TYPE;
	
	DBUtils.insertOneHotItemInfo2DB(getApplicationContext(),
			UtilTools.getCurrentUserId(getApplicationContext()), prod_id, info);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:26,代码来源:ShowXiangqingTv.java


示例10: shoucangResult

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void shoucangResult(String url, JSONObject json, AjaxStatus status){
	xiaiBt.setEnabled(true);
	favNum ++;
	
	xiaiBt.setText(favNum + "");
	ItemStateUtils.shoucangButtonToFocusState(xiaiBt, getApplicationContext());
	isXiai = true;
	
	if(json == null || json.equals("")) 
		return;
	
	Log.d(TAG, "shoucangResult:----->" + json.toString());
	
	HotItemInfo info = new HotItemInfo();
	info.prod_id = prod_id;
	info.prod_name = date.show.name;
	info.score = date.show.score;
	info.prod_pic_url = pic_url;
	info.cur_episode = date.show.cur_episode;
	info.max_episode = date.show.max_episode;
	info.prod_type = BangDanConstant.ZONGYI_TYPE;
	
	DBUtils.insertOneHotItemInfo2DB(getApplicationContext(),
			UtilTools.getCurrentUserId(getApplicationContext()), prod_id, info);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:26,代码来源:ShowXiangqingZongYi.java


示例11: cancelshoucangResult

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void cancelshoucangResult(String url, JSONObject json, AjaxStatus status){
	
	xiaiBt.setEnabled(true);
	
	//闹钟开启的情况下,取消收藏删除数据库中相关数据
	if(UtilTools.is48TimeClock(getApplicationContext()))
		DBUtils.deleteData4ProId(getApplicationContext(), 
			UtilTools.getCurrentUserId(getApplicationContext()), prod_id);
	
		if(favNum - 1 >=0) {
			
			favNum --;
			xiaiBt.setText((favNum) + "");
			ItemStateUtils.shoucangButtonToNormalState(xiaiBt, getApplicationContext());
		}
	isXiai = false;
	
	if(json == null || json.equals("")) 
		return;
	Log.d(TAG, "cancel:----->"+json.toString());
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:22,代码来源:ShowXiangqingDongman.java


示例12: shoucangResult

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void shoucangResult(String url, JSONObject json, AjaxStatus status){
	xiaiBt.setEnabled(true);
	favNum ++;
	
	xiaiBt.setText(favNum + "");
	ItemStateUtils.shoucangButtonToFocusState(xiaiBt, getApplicationContext());
	isXiai = true;
	
	if(json == null || json.equals("")) 
		return;
	
	Log.d(TAG, "shoucangResult:----->" + json.toString());
	
	HotItemInfo info = new HotItemInfo();
	info.prod_id = prod_id;
	info.prod_name = date.tv.name;
	info.score = date.tv.score;
	info.prod_pic_url = pic_url;
	info.cur_episode = date.tv.cur_episode;
	info.max_episode = date.tv.max_episode;
	info.prod_type = BangDanConstant.DONGMAN_TYPE;
	
	DBUtils.insertOneHotItemInfo2DB(getApplicationContext(),
			UtilTools.getCurrentUserId(getApplicationContext()), prod_id, info);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:26,代码来源:ShowXiangqingDongman.java


示例13: cancelshoucangResult

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void cancelshoucangResult(String url, JSONObject json,
		AjaxStatus status) {

	xiaiBt.setEnabled(true);

	if (favNum - 1 >= 0) {

		favNum--;
		xiaiBt.setText((favNum) + "");
		ItemStateUtils.shoucangButtonToNormalState(xiaiBt,
				getApplicationContext());
	}
	isXiai = false;

	if (json == null || json.equals(""))
		return;

	Log.d(TAG, "cancel:----->" + json.toString());
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:20,代码来源:ShowXiangqingMovie.java


示例14: onCreate

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.address_book_listview);

    final ActionBar chatting = getActionBar();
    chatting.setCustomView(R.layout.custom_address_book);
    chatting.setDisplayShowTitleEnabled(false);
    chatting.setDisplayShowCustomEnabled(true);
    chatting.setDisplayShowHomeEnabled(false);

    backBtn = (Button) findViewById(R.id.backBtn);

    AQuery aq = new AQuery(getApplicationContext());

    aq.ajax("http://52.79.134.200/friend", String.class, new AjaxCallback<String>() {
        @Override
        public void callback(String url, String response, AjaxStatus status) {
            if(status.getCode() == 200) {
                try {
                    JSONObject res = new JSONObject(response);
                } catch(JSONException e) {
                    e.printStackTrace();
                }
            } else {

            }
        }
    }.method(AQuery.METHOD_GET).cookie("UserSession", SessionManager.getCookieFromDB(getApplicationContext())));

    backBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            startActivity(new Intent(getApplicationContext(), Main.class));
        }
    });
}
 
开发者ID:JoMingyu,项目名称:Daejeon-People,代码行数:38,代码来源:FriendList.java


示例15: getInfo

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void getInfo() {
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("emp_id", empid);

    aQuery.ajax(getInfo, params, JSONObject.class,new AjaxCallback<JSONObject>() {
        @Override
        public void callback(String url, JSONObject json, AjaxStatus status) {

            if (json != null) {
                try {
                    int length = json.getInt("length");

                    String in = json.getString("ResultSet");

                    JSONObject reader = new JSONObject(in);
                    for (int i = 0; i < length; i++) {
                        JSONObject obj = reader.getJSONObject(String.valueOf(i));
                        ID = obj.getString("ID");

                    }
                }catch (Exception e){
                    e.printStackTrace();
                }

            }else {
                Log.d("id", "NULL");
            }
            if(status.getCode() == 200 && status.getCode() < 300){
                if(ID.equals("")) {
                    //insertInfo();
                    sendOTP();
                } else {
                    toast = Toast.makeText(context, "Account is registered on another device", Toast.LENGTH_SHORT);
                    toast.show();
                }
            }
        }

    });
}
 
开发者ID:CoepPortal,项目名称:PortalApp,代码行数:41,代码来源:FacultySignUp.java


示例16: getFacultyInfo

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
public void getFacultyInfo() {
        Map<String, String> params = new HashMap<>();
        params.put("emp_id", empid);

        aQuery.ajax(facultyinfo, params, JSONObject.class, new AjaxCallback<JSONObject>() {
            @Override
            public void callback(String url, JSONObject json, AjaxStatus status) {

                if (json != null) {
                    try {
                        String ResultSet = json.getString("ResultSet");
                        JSONObject jsonObject = new JSONObject(ResultSet);
                        JSONObject reader = jsonObject.getJSONObject("0");
                        emp_name = reader.getString("EmployeeName");
                        emp_email = reader.getString("CoepEmail");
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
                if (status.getCode() == 200 && status.getCode() < 300) {
//                    SharedPreferences.Editor editor = sharedPreferences.edit();
//                    editor.putString("employeeregcode", empid);
//                    editor.putString("employeename", emp_name);
//                    editor.putString("employeeemail", emp_email);
//                    editor.commit();
                    getInfo();
                }
            }
        });
    }
 
开发者ID:CoepPortal,项目名称:PortalApp,代码行数:31,代码来源:FacultySignUp.java


示例17: onPostExecute

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
@Override
protected void onPostExecute(Bundle bundle)
{
	if (bundle != null && bundle.containsKey(AccountManager.KEY_AUTHTOKEN))
	{
		token = bundle.getString(AccountManager.KEY_AUTHTOKEN);
		//AQUtility.debug("stored auth", token);
		success(act);
	}
	else
	{
		failure(act, AjaxStatus.AUTH_ERROR, "rejected");
	}
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:15,代码来源:GoogleHandle.java


示例18: callback

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
protected void callback(String url, JSONObject jo, AjaxStatus status)
{
	if (jo == null)
		return;
	String latestVer = jo.optString("version", "0");
	int latestCode = jo.optInt("code", 0);
	AQUtility.debug("version", getVersion() + "->" + latestVer + ":" + getVersionCode() + "->" + latestCode);
	AQUtility.debug("outdated", outdated(latestVer, latestCode));
	if (force || outdated(latestVer, latestCode))
	{
		showUpdateDialog(jo);
	}
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:14,代码来源:MarketService.java


示例19: cb

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
private void cb(String url, JSONObject jo, AjaxStatus status)
{
	if (!completed)
	{
		completed = true;
		progress = 0;
		callback(url, jo, status);
	}
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:10,代码来源:MarketService.java


示例20: detailCb

import com.androidquery.callback.AjaxStatus; //导入依赖的package包/类
@SuppressWarnings("unused")
public void detailCb(String url, String html, AjaxStatus status)
{
	if (html != null && html.length() > 1000)
	{
		String qurl = getQueryUrl();
		AjaxCallback<JSONObject> cb = new AjaxCallback<JSONObject>();
		cb.url(qurl).type(JSONObject.class).handler(this, "marketCb");
		cb.param("html", html);
		aq.progress(progress).ajax(cb);
	}
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:13,代码来源:MarketService.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PsiModifierList类代码示例发布时间:2022-05-21
下一篇:
Java BigqueryScopes类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap