use of com.yydcdut.note.views.IView in project PhotoNoter by yydcdut.
the class SandBoxServicePresenterImpl method attachView.
@Override
public void attachView(IView iView) {
mSandBoxServiceView = (ISandBoxServiceView) iView;
mSandBoxServiceView.notification();
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
finishSandBoxService();
}
};
mRxSandBox.findAll().flatMap(sandPhotos -> Observable.from(sandPhotos)).subscribe((sandPhoto -> makePhoto(sandPhoto)), (throwable -> YLog.e(throwable)), (() -> mHandler.sendEmptyMessageDelayed(0, 4000)));
}
use of com.yydcdut.note.views.IView in project PhotoNoter by yydcdut.
the class PermissionAspect method afterPermissionRequestBack.
@After("execution(* android.support.v4.app.FragmentActivity.onRequestPermissionsResult(..))")
public void afterPermissionRequestBack(JoinPoint joinPoint) {
YLog.i(TAG, "afterPermissionRequestBack");
Object[] objects = joinPoint.getArgs();
Object object = joinPoint.getTarget();
if (objects.length >= 1 && objects[0] instanceof Integer && object != null && object instanceof IView && ((IView) object).getPresenter() != null) {
int requestCode = (int) objects[0];
invokeMethod(((IView) object).getPresenter(), requestCode);
} else {
YLog.i(TAG, "afterPermissionRequestBack --> bad");
}
}
use of com.yydcdut.note.views.IView in project PhotoNoter by yydcdut.
the class EditCategoryPresenterImpl method attachView.
@Override
public void attachView(IView iView) {
mHandler = new Handler(this);
mDeleteCategoryIdList = new ArrayList<>();
mRenameCategoryLabelMap = new HashMap<>();
mEditCategoryView = (IEditCategoryView) iView;
mRxCategory.getAllCategories().observeOn(AndroidSchedulers.mainThread()).subscribe(categories -> mEditCategoryView.showCategoryList(categories), (throwable -> YLog.e(throwable)));
}
use of com.yydcdut.note.views.IView in project PhotoNoter by yydcdut.
the class PermissionAspect method afterPermissionRequestBack4Fragment.
@After("execution(* android.app.Fragment.onRequestPermissionsResult(..))")
public void afterPermissionRequestBack4Fragment(JoinPoint joinPoint) {
Object[] objects = joinPoint.getArgs();
Object object = joinPoint.getTarget();
if (objects.length >= 1 && objects[0] instanceof Integer && object != null && object instanceof IView && ((IView) object).getPresenter() != null) {
int requestCode = (int) objects[0];
invokeMethod(((IView) object).getPresenter(), requestCode);
} else {
YLog.i(TAG, "afterPermissionRequestBack4Fragment --> bad");
}
}
Aggregations