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


Java FindListener类代码示例

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


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

示例1: findWeibos

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
private void findWeibos()
  {
//MyUser user = BmobUser.getCurrentUser(LoginF.this, MyUser.class);
BmobQuery<Login> query = new BmobQuery<Login>();
//query.addWhereEqualTo("author", user);	// 查询当前用户的所有微博
query.order("-updatedAt");
query.include("author");// 希望在查询微博信息的同时也把发布人的信息查询出来,可以使用include方法
query.findObjects(LoginF.this, new FindListener<Login>() {
		@Override
		public void onSuccess(List<Login> object)
		{
			// TODO Auto-generated method stub
			weibos = object;
			adapter.notifyDataSetChanged();
			//  mProgressDialog.dismiss();
		}

		@Override
		public void onError(int code, String msg)
		{
			// TODO Auto-generated method stub
			//   toast("查询失败:" + msg);
		}
	});
//mProgressDialog = ProgressDialog.show(getActivity(), null, getResources().getString(R.string.del_));
  }
 
开发者ID:stytooldex,项目名称:stynico,代码行数:27,代码来源:LoginF.java

示例2: findWeibos_

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
private void findWeibos_()
{
	nico.styTool.MyUser user = BmobUser.getCurrentUser(this, nico.styTool.MyUser.class);
	BmobQuery<Post_> query = new BmobQuery<Post_>();
	query.addWhereEqualTo("author", user);	// 查询当前用户的所有微博
	query.order("-updatedAt");
	query.include("author");// 希望在查询微博信息的同时也把发布人的信息查询出来,可以使用include方法
	query.findObjects(this, new FindListener<Post_>() {
			@Override
			public void onSuccess(List<Post_> object)
			{
				// TODO Auto-generated method stub
				weibos = object;
				adapter.notifyDataSetChanged();
				//et_content.setText("");
			}

			@Override
			public void onError(int code, String msg)
			{
				// TODO Auto-generated method stub
				//toast("查询失败:"+msg);
			}
		});
}
 
开发者ID:stytooldex,项目名称:stynico,代码行数:26,代码来源:WeiboListActivity.java

示例3: findComments

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
private void findComments()
{
	BmobQuery<Comment_> query = new BmobQuery<Comment_>();
	// pointer类型
	query.addWhereEqualTo("post", new BmobPointer(weibo));		
	query.include("user,post.author");
	query.findObjects(getActivity(), new FindListener<Comment_>() {

			@Override
			public void onSuccess(List<Comment_> object)
			{
				// TODO Auto-generated method stub
				comments = object;
				adapter.notifyDataSetChanged();
				et_content.setText("");
			}

			@Override
			public void onError(int code, String msg)
			{
				// TODO Auto-generated method stub
				//toast("查询失败:"+msg);
			}
		});}
 
开发者ID:stytooldex,项目名称:stynico,代码行数:25,代码来源:CommentListActivity.java

示例4: startSearchUser

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
private void startSearchUser(final String username, final String password) {
	BmobQuery<UserLogin> query = new BmobQuery<>();
	query.addWhereEqualTo("username", username);
	query.setLimit(1);
	query.findObjects(new FindListener<UserLogin>() {
		@Override
		public void done(List<UserLogin> list, BmobException e) {
			if (e == null && !list.isEmpty()) {
				startLogin(list.get(0));
			} else if (e == null) {
				startRegister(username, password);
			} else {
				showNormalDia("温馨提示", "登录失败!请检查网络连接");
				Log.e(TAG, "query.findObjects: ", e);
			}
		}
	});
}
 
开发者ID:tony-Shx,项目名称:Swface,代码行数:19,代码来源:LoginActivity.java

示例5: query

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
public void query() {
    BmobQuery<Order> queryData = new BmobQuery<Order>();
    queryData.setLimit(15);
    queryData.include("user");
    queryData.findObjects(getActivity(), new FindListener<Order>() {
        @Override
        public void onSuccess(List<Order> list) {
            if (list != null) {
                mLists = list;
                myItemAdapter.updateItems(mLists);
            }
        }
        @Override
        public void onError(int i, String s) {
            Toast.makeText(getActivity(), "查询失败", Toast.LENGTH_SHORT).show();
        }
    });
}
 
开发者ID:Break369,项目名称:MyLife,代码行数:19,代码来源:main0fragment.java

示例6: refresh

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
public void refresh() {
    BmobQuery<Order> queryData = new BmobQuery<Order>();
    queryData.setLimit(15);
    queryData.include("user");
    queryData.findObjects(getActivity(), new FindListener<Order>() {
        @Override
        public void onSuccess(List<Order> list) {
            if (list != null) {
                mLists.clear();
                mLists.addAll(list);
                Toast.makeText(getActivity(), "刷新成功", Toast.LENGTH_SHORT).show();
                myItemAdapter.updateItems(mLists);
                refreshLayout.setRefreshing(false);
            }
        }
        @Override
        public void onError(int i, String s) {
            Toast.makeText(getActivity(), "网络出错", Toast.LENGTH_SHORT).show();
            refreshLayout.setRefreshing(false);
        }
    });
}
 
开发者ID:Break369,项目名称:MyLife,代码行数:23,代码来源:main0fragment.java

示例7: initRandomAvatar

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
public static void initRandomAvatar() {
        if (avatarList.size() > 0) {
                avatarList.clear();
        }
        MsgManager.getInstance().getAllDefaultAvatarFromServer(new FindListener<String>() {
                @Override
                public void onSuccess(List<String> list) {
                        if (list != null && list.size() > 0) {
                                LogUtil.e("获取到默认头像数据拉");
                                for (String url :
                                        list) {
                                        LogUtil.e(url);
                                }
                                avatarList.addAll(list);
                        } else {
                                LogUtil.e("从服务器上获取的到的默认的头像数据为空");
                        }
                }

                @Override
                public void onError(int i, String s) {
                        LogUtil.e("从服务器上获取的到的默认的头像数据失败" + s + i);
                }
        });
}
 
开发者ID:HelloChenJinJun,项目名称:TestChat,代码行数:26,代码来源:RandomData.java

示例8: initRandomWallPaper

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
public static void initRandomWallPaper() {
        MsgManager.getInstance().getAllDefaultWallPaperFromServer(new FindListener<String>() {
                @Override
                public void onSuccess(List<String> list) {
                        if (list != null && list.size() > 0) {
                                LogUtil.e("获取到默认背景数据拉");
                                for (String url :
                                        list) {
                                        LogUtil.e(url);
                                }
                                wallPaperList.addAll(list);
                        } else {
                                LogUtil.e("从服务器上获取的到的默认的背景数据为空");
                        }
                }

                @Override
                public void onError(int i, String s) {
                        LogUtil.e("从服务器上获取的到的默认的背景数据失败" + s + i);
                }
        });

}
 
开发者ID:HelloChenJinJun,项目名称:TestChat,代码行数:24,代码来源:RandomData.java

示例9: initTitleWallPaper

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
public static void initTitleWallPaper() {
        MsgManager.getInstance().getAllDefaultTitleWallPaperFromServer(new FindListener<String>() {
                @Override
                public void onSuccess(List<String> list) {
                        if (list != null && list.size() > 0) {
                                LogUtil.e("获取到默认背景数据拉");
                                for (String url :
                                        list) {
                                        LogUtil.e(url);
                                }
                                titleWallPaper.addAll(list);
                        } else {
                                LogUtil.e("从服务器上获取的到的默认的背景数据为空");
                        }
                }

                @Override
                public void onError(int i, String s) {
                        LogUtil.e("从服务器上获取的到的默认的背景数据失败" + s + i);
                }
        });
}
 
开发者ID:HelloChenJinJun,项目名称:TestChat,代码行数:23,代码来源:RandomData.java

示例10: queryBlackList

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
/**
 * 查询黑名单用户
 *
 * @param callback 回调
 */
private void queryBlackList(final FindListener<User> callback) {
        BmobQuery<User> query = new BmobQuery<>();
        query.order("updateAt");
        query.addWhereRelatedTo(COLUMN_NAME_BLACKLIST, new BmobPointer(getCurrentUser()));
        query.findObjects(CustomApplication.getInstance(), new FindListener<User>() {
                        @Override
                        public void onSuccess(List<User> list) {
                                callback.onSuccess(list);
                        }

                        @Override
                        public void onError(int i, String s) {
                                callback.onError(i, s);
                        }
                }
        );
}
 
开发者ID:HelloChenJinJun,项目名称:TestChat,代码行数:23,代码来源:UserManager.java

示例11: checkNameExist

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
public void checkNameExist(final String name, final String password, final String phone, final String email) {

        if (emptyChecked(name, password, phone)) {
            ThreadUtils.runOnSubthread(new Runnable() {
                @Override
                public void run() {
                    BmobQuery<UserInfo> bmobQuery = new BmobQuery<>();
                    bmobQuery.addWhereEqualTo("username", name);
                    bmobQuery.findObjects(new FindListener<UserInfo>() {
                        @Override
                        public void done(List<UserInfo> list, BmobException e) {
                            if (list.size() > 0) {
                                iRegisterView.nameExist();
                            } else {
                                registe(name, password, phone, email);
                            }
                        }
                    });
                }
            });
        }
    }
 
开发者ID:ITBlackDog,项目名称:XiaoHuaCharge,代码行数:23,代码来源:RegisterPrecenter.java

示例12: getLikesData

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
private void getLikesData() {
    BmobQuery<MyUser> query = new BmobQuery<>();
    Post post = new Post();
    post.setObjectId(mPost.getObjectId());
    query.addWhereRelatedTo("likes", new BmobPointer(post));
    query.findObjects(new FindListener<MyUser>() {
        @Override
        public void done(List<MyUser> list, BmobException e) {
            if (e == null) {
                if (list.isEmpty()) {
                    mPostDetailLikesRecycler.setVisibility(View.GONE);
                    mLikesNo.setVisibility(View.VISIBLE);
                    mLikesNo.setText(R.string.likes_no);
                } else {
                    mPostDetailLikesRecycler.setVisibility(View.VISIBLE);
                    mLikesNo.setVisibility(View.GONE);
                    mLikesAdapter.setLikesUserData(list);
                    mLikesAdapter.notifyDataSetChanged();
                }
            } else {
                Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
            }
        }
    });
}
 
开发者ID:struggledhard,项目名称:USay,代码行数:26,代码来源:PostDetailLikesFragment.java

示例13: getListFromNet

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
@Override
public Observable<List<VideoDaoEntity>> getListFromNet(int start, String userid) {
    return Observable.create((ObservableOnSubscribe<List<VideoDaoEntity>>) emitter -> {

        BmobQuery<VideoDaoEntity> query = new BmobQuery<VideoDaoEntity>();
        query.addWhereEqualTo("userId", userid);
        query.setLimit(10);
        query.order("-updatedAt");
        query.setSkip(start);
        query.findObjects(new FindListener<VideoDaoEntity>() {
            @Override
            public void done(List<VideoDaoEntity> list, BmobException e) {
                List<VideoDaoEntity> infolist = new ArrayList<VideoDaoEntity>();
                if (!StringUtils.isEmpty(list)) {
                    for (VideoDaoEntity entity1 : list) {
                        entity1.setVideo(mGson.fromJson(entity1.getBody(), VideoListInfo.Video.VideoData.class));
                        infolist.add(entity1);
                    }
                }
                emitter.onNext(infolist);
            }
        });
    });
}
 
开发者ID:Zweihui,项目名称:Aurora,代码行数:25,代码来源:HistoryModel.java

示例14: getMyAttentionList

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
@Override
public Observable<List<MyAttentionEntity>> getMyAttentionList(String userid) {
    return Observable.create((ObservableOnSubscribe<List<MyAttentionEntity>>) emitter -> {

        BmobQuery<MyAttentionEntity> query = new BmobQuery<MyAttentionEntity>();
        query.addWhereEqualTo("userId", userid);
        query.order("-createdAt");
        query.findObjects(new FindListener<MyAttentionEntity>() {
            @Override
            public void done(List<MyAttentionEntity> list, BmobException e) {
                if (list!=null)
                    emitter.onNext(list);
            }
        });
    });
}
 
开发者ID:Zweihui,项目名称:Aurora,代码行数:17,代码来源:AttentionModel.java

示例15: queryPersonActivity

import cn.bmob.v3.listener.FindListener; //导入依赖的package包/类
/**
 * 查询我参与的活动
 */
private void queryPersonActivity() {
    BmobQuery<MActivity> query = new BmobQuery<>();
    query.addWhereEqualTo("currentUser",currentUser);
    query.include("currentUser");
    query.order("-createdAt");

    query.findObjects(new FindListener<MActivity>() {
        @Override
        public void done(List<MActivity> list, BmobException e) {
            if (e == null) {
                if (list.size() > 0) {
                    activities.clear();
                    activities.addAll(list);
                    activityAdapter.notifyDataSetChanged();
                } else {
                    showToast("服务器没有数据");
                }
                swipeRefreshLayout.setRefreshing(false);
            } else {
                showToast("请求服务器失败,请稍后重试" + e.getMessage() + e.getErrorCode());
                swipeRefreshLayout.setRefreshing(false);
            }
        }
    });
}
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:29,代码来源:PersonActivityFragment.java


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