本文整理汇总了Java中kr.co.namee.permissiongen.PermissionFail类的典型用法代码示例。如果您正苦于以下问题:Java PermissionFail类的具体用法?Java PermissionFail怎么用?Java PermissionFail使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PermissionFail类属于kr.co.namee.permissiongen包,在下文中一共展示了PermissionFail类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: permissionFailure
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFailure(){
Toast.makeText(this, "权限拒绝,无法正常使用", Toast.LENGTH_LONG).show();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
finish();
}
}, 1000);
}
示例2: findMethodPermissionFailWithRequestCode
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
public static <A extends Annotation> Method findMethodPermissionFailWithRequestCode(Class clazz,
Class<A> permissionFailClass, int requestCode) {
for (Method method : clazz.getDeclaredMethods()) {
if (method.isAnnotationPresent(permissionFailClass)) {
if (requestCode == method.getAnnotation(PermissionFail.class).requestCode()) {
return method;
}
}
}
return null;
}
示例3: isEqualRequestCodeFromAnntation
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
public static boolean isEqualRequestCodeFromAnntation(Method m, Class clazz, int requestCode) {
if (clazz.equals(PermissionFail.class)) {
return requestCode == m.getAnnotation(PermissionFail.class).requestCode();
} else if (clazz.equals(PermissionSuccess.class)) {
return requestCode == m.getAnnotation(PermissionSuccess.class).requestCode();
} else {
return false;
}
}
示例4: findMethodPermissionFailWithRequestCode
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
public static <A extends Annotation> Method findMethodPermissionFailWithRequestCode(Class clazz,
Class<A> permissionFailClass, int requestCode) {
for(Method method : clazz.getDeclaredMethods()){
if(method.isAnnotationPresent(permissionFailClass)){
if(requestCode == method.getAnnotation(PermissionFail.class).requestCode()){
return method;
}
}
}
return null;
}
示例5: isEqualRequestCodeFromAnntation
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
public static boolean isEqualRequestCodeFromAnntation(Method m, Class clazz, int requestCode){
if(clazz.equals(PermissionFail.class)){
return requestCode == m.getAnnotation(PermissionFail.class).requestCode();
} else if(clazz.equals(PermissionSuccess.class)){
return requestCode == m.getAnnotation(PermissionSuccess.class).requestCode();
} else {
return false;
}
}
示例6: doFailSomething
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = PERMISSION_WRITE)
public void doFailSomething() {
UIUtils.toastShort(BaseActivity.this, "权限申请失败,可能影响使用");
}
示例7: doFailSomething
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void doFailSomething() {
Toast.makeText(this, "Permission is failed", Toast.LENGTH_SHORT).show();
}
示例8: permissionFailure
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFailure(){
Toast.makeText(mContext, "permission deny", Toast.LENGTH_SHORT).show();
setPageState(BaseState.ERROR);
}
示例9: permissionFailure
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFailure(){
setPageState(BaseState.ERROR);
}
示例10: permissionFailure
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFailure(){
Toast.makeText(this, "permission deny", Toast.LENGTH_SHORT).show();
setPageState(BaseState.ERROR);
}
示例11: permissionFail
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFail() {
UIUtils.showToast("获取相机权限失败");
}
示例12: openGroupFail
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
private void openGroupFail() {
Toast.makeText(this, "读写权限未打开", Toast.LENGTH_SHORT).show();
textView.setVisibility(View.VISIBLE);
}
示例13: doFailSomething
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = SUCCESSCODE)
public void doFailSomething() {
Toast.makeText(EventContentActivity.this,"Ask for permission failed!",Toast.LENGTH_SHORT).show();
}
示例14: onPermissionFail
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void onPermissionFail(){
Toast.makeText(this, "permission deny", Toast.LENGTH_SHORT).show();
}
示例15: openGroupFail
import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
private void openGroupFail() {
Toast.makeText(this, "Group permission is not granted", Toast.LENGTH_SHORT).show();
}