本文整理汇总了Java中com.lqr.wechat.util.UIUtils.showToast方法的典型用法代码示例。如果您正苦于以下问题:Java UIUtils.showToast方法的具体用法?Java UIUtils.showToast怎么用?Java UIUtils.showToast使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.lqr.wechat.util.UIUtils
的用法示例。
在下文中一共展示了UIUtils.showToast方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadNewFriendData
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
public void loadNewFriendData() {
if (!NetUtils.isNetworkAvailable(mContext)) {
UIUtils.showToast(UIUtils.getString(R.string.please_check_net));
return;
}
loadData();
setAdapter();
}
示例2: agreeFriends
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
private void agreeFriends(String friendId, LQRViewHolderForRecyclerView helper) {
if (!NetUtils.isNetworkAvailable(mContext)) {
UIUtils.showToast(UIUtils.getString(R.string.please_check_net));
return;
}
ApiRetrofit.getInstance().agreeFriends(friendId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.flatMap(new Func1<AgreeFriendsResponse, Observable<GetUserInfoByIdResponse>>() {
@Override
public Observable<GetUserInfoByIdResponse> call(AgreeFriendsResponse agreeFriendsResponse) {
if (agreeFriendsResponse != null && agreeFriendsResponse.getCode() == 200) {
helper.setViewVisibility(R.id.tvAdded, View.VISIBLE)
.setViewVisibility(R.id.btnAck, View.GONE);
return ApiRetrofit.getInstance().getUserInfoById(friendId);
}
return Observable.error(new ServerException(UIUtils.getString(R.string.agree_friend_fail)));
}
})
.subscribe(getUserInfoByIdResponse -> {
if (getUserInfoByIdResponse != null && getUserInfoByIdResponse.getCode() == 200) {
GetUserInfoByIdResponse.ResultEntity result = getUserInfoByIdResponse.getResult();
UserInfo userInfo = new UserInfo(UserCache.getId(), result.getNickname(), Uri.parse(result.getPortraitUri()));
if (TextUtils.isEmpty(userInfo.getPortraitUri().toString())) {
userInfo.setPortraitUri(Uri.parse(DBManager.getInstance().getPortraitUri(userInfo)));
}
Friend friend = new Friend(userInfo.getUserId(), userInfo.getName(), userInfo.getPortraitUri().toString());
DBManager.getInstance().saveOrUpdateFriend(friend);
UIUtils.postTaskDelay(() -> {
BroadcastManager.getInstance(UIUtils.getContext()).sendBroadcast(AppConst.UPDATE_FRIEND);
BroadcastManager.getInstance(UIUtils.getContext()).sendBroadcast(AppConst.UPDATE_CONVERSATIONS);
}, 1000);
}
}, this::loadError);
}
示例3: registerError
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
private void registerError(Throwable throwable) {
LogUtils.sf(throwable.getLocalizedMessage());
UIUtils.showToast(throwable.getLocalizedMessage());
}
示例4: setDisplayNameError
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
private void setDisplayNameError(Throwable throwable) {
LogUtils.sf(throwable.getLocalizedMessage());
UIUtils.showToast(UIUtils.getString(R.string.change_fail));
mSetDisplayNameDialog.dismiss();
}
示例5: uploadError
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
private void uploadError(Throwable throwable) {
if (throwable != null)
LogUtils.sf(throwable.getLocalizedMessage());
mContext.hideWaitingDialog();
UIUtils.showToast(UIUtils.getString(R.string.set_fail));
}
示例6: loadError
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
private void loadError(Throwable throwable) {
LogUtils.sf(throwable.getLocalizedMessage());
UIUtils.showToast(throwable.getLocalizedMessage());
}
示例7: sendCodeError
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
private void sendCodeError(Throwable throwable) {
mContext.hideWaitingDialog();
LogUtils.e(throwable.getLocalizedMessage());
UIUtils.showToast(throwable.getLocalizedMessage());
}
示例8: loadError
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
private void loadError(Throwable throwable) {
LogUtils.e(throwable.getLocalizedMessage());
UIUtils.showToast(UIUtils.getString(R.string.load_contacts_error));
}
示例9: permissionFail
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFail() {
UIUtils.showToast("获取相机权限失败");
}
示例10: loadError
import com.lqr.wechat.util.UIUtils; //导入方法依赖的package包/类
private void loadError(Throwable throwable) {
LogUtils.sf(throwable.getLocalizedMessage());
hideWaitingDialog();
UIUtils.showToast(UIUtils.getString(R.string.set_fail));
}