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


Java PatternLockCompleteEvent类代码示例

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


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

示例1: subscribeActual

import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent; //导入依赖的package包/类
@Override
protected void subscribeActual(Observer<? super PatternLockCompleteEvent> observer) {
    subscribeListener(observer);
    if (mEmitInitialValue) {
        observer.onNext(new PatternLockCompleteEvent(mPatternLockView.getPattern()));
    }
}
 
开发者ID:aritraroy,项目名称:PatternLockView,代码行数:8,代码来源:PatternLockViewCompleteObservable.java

示例2: setUpObservables

import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent; //导入依赖的package包/类
private void setUpObservables() {
    RxPatternLockView.patternComplete(mPatternLockView)
            .subscribe(new Consumer<PatternLockCompleteEvent>() {
                @Override
                public void accept(PatternLockCompleteEvent patternLockCompleteEvent) throws Exception {
                    Log.d(getClass().getName(), "Complete: " + patternLockCompleteEvent.getPattern().toString());
                }
            });

    RxPatternLockView.patternChanges(mPatternLockView)
            .subscribe(new Consumer<PatternLockCompoundEvent>() {
                @Override
                public void accept(PatternLockCompoundEvent event) throws Exception {
                    if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_STARTED) {
                        Log.d(getClass().getName(), "Pattern drawing started");
                    }
                    else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_PROGRESS) {
                        Log.d(getClass().getName(), "Pattern progress: " +
                                PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
                    }
                    else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_COMPLETE) {
                        Log.d(getClass().getName(), "Pattern complete: " +
                                PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
                    }
                    else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_CLEARED) {
                        Log.d(getClass().getName(), "Pattern has been cleared");
                    }
                }
            });
}
 
开发者ID:gsttarun,项目名称:AppLockLibrary,代码行数:31,代码来源:LockActivity.java

示例3: onCreate

import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_lock_pattern);

    mPatternLockView = (PatternLockView) findViewById(R.id.patter_lock_view);
    mPatternLockView.setDotCount(3);
    mPatternLockView.setDotNormalSize((int) ResourceUtils.getDimensionInPx(this, R.dimen.pattern_lock_dot_size));
    mPatternLockView.setDotSelectedSize((int) ResourceUtils.getDimensionInPx(this, R.dimen.pattern_lock_dot_selected_size));
    mPatternLockView.setPathWidth((int) ResourceUtils.getDimensionInPx(this, R.dimen.pattern_lock_path_width));
    mPatternLockView.setAspectRatioEnabled(true);
    mPatternLockView.setAspectRatio(PatternLockView.AspectRatio.ASPECT_RATIO_HEIGHT_BIAS);
    mPatternLockView.setViewMode(PatternLockView.PatternViewMode.CORRECT);
    mPatternLockView.setDotAnimationDuration(150);
    mPatternLockView.setPathEndAnimationDuration(100);
    mPatternLockView.setCorrectStateColor(ResourceUtils.getColor(this, R.color.white));
    mPatternLockView.setInStealthMode(false);
    mPatternLockView.setTactileFeedbackEnabled(true);
    mPatternLockView.setInputEnabled(true);
    mPatternLockView.addPatternLockListener(mPatternLockViewListener);

    RxPatternLockView.patternComplete(mPatternLockView)
            .subscribe(new Consumer<PatternLockCompleteEvent>() {
                @Override
                public void accept(PatternLockCompleteEvent patternLockCompleteEvent) throws Exception {
                    Log.d(TAG, "Complete: " + patternLockCompleteEvent.getPattern().toString());
                }
            });

    RxPatternLockView.patternChanges(mPatternLockView)
            .subscribe(new Consumer<PatternLockCompoundEvent>() {
                @Override
                public void accept(PatternLockCompoundEvent event) throws Exception {
                    if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_STARTED) {
                        Log.d(TAG, "Pattern drawing started");
                    } else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_PROGRESS) {
                        Log.d(TAG, "Pattern progress: " +
                                PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
                    } else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_COMPLETE) {
                        Log.d(TAG, "Pattern complete: " +
                                PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
                    } else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_CLEARED) {
                        Log.d(TAG, "Pattern has been cleared");
                    }
                }
            });
}
 
开发者ID:xingstarx,项目名称:TinkerDemo,代码行数:51,代码来源:LockPatternActivity.java

示例4: subscribeListener

import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent; //导入依赖的package包/类
@Override
protected void subscribeListener(Observer<? super PatternLockCompleteEvent> observer) {
    InternalListener internalListener = new InternalListener(mPatternLockView, observer);
    observer.onSubscribe(internalListener);
    mPatternLockView.addPatternLockListener(internalListener);
}
 
开发者ID:aritraroy,项目名称:PatternLockView,代码行数:7,代码来源:PatternLockViewCompleteObservable.java

示例5: InternalListener

import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent; //导入依赖的package包/类
InternalListener(PatternLockView view, Observer<? super PatternLockCompleteEvent> observer) {
    this.view = view;
    this.observer = observer;
}
 
开发者ID:aritraroy,项目名称:PatternLockView,代码行数:5,代码来源:PatternLockViewCompleteObservable.java

示例6: onComplete

import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent; //导入依赖的package包/类
@Override
public void onComplete(List<PatternLockView.Dot> pattern) {
    if (!isDisposed()) {
        observer.onNext(new PatternLockCompleteEvent(pattern));
    }
}
 
开发者ID:aritraroy,项目名称:PatternLockView,代码行数:7,代码来源:PatternLockViewCompleteObservable.java

示例7: onCreate

import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_main);

    mPatternLockView = (PatternLockView) findViewById(R.id.patter_lock_view);
    mPatternLockView.setDotCount(3);
    mPatternLockView.setDotNormalSize((int) ResourceUtils.getDimensionInPx(this, R.dimen.pattern_lock_dot_size));
    mPatternLockView.setDotSelectedSize((int) ResourceUtils.getDimensionInPx(this, R.dimen.pattern_lock_dot_selected_size));
    mPatternLockView.setPathWidth((int) ResourceUtils.getDimensionInPx(this, R.dimen.pattern_lock_path_width));
    mPatternLockView.setAspectRatioEnabled(true);
    mPatternLockView.setAspectRatio(PatternLockView.AspectRatio.ASPECT_RATIO_HEIGHT_BIAS);
    mPatternLockView.setViewMode(PatternLockView.PatternViewMode.CORRECT);
    mPatternLockView.setDotAnimationDuration(150);
    mPatternLockView.setPathEndAnimationDuration(100);
    mPatternLockView.setCorrectStateColor(ResourceUtils.getColor(this, R.color.white));
    mPatternLockView.setInStealthMode(false);
    mPatternLockView.setTactileFeedbackEnabled(true);
    mPatternLockView.setInputEnabled(true);
    mPatternLockView.addPatternLockListener(mPatternLockViewListener);

    RxPatternLockView.patternComplete(mPatternLockView)
            .subscribe(new Consumer<PatternLockCompleteEvent>() {
                @Override
                public void accept(PatternLockCompleteEvent patternLockCompleteEvent) throws Exception {
                    Log.d(getClass().getName(), "Complete: " + patternLockCompleteEvent.getPattern().toString());
                }
            });

    RxPatternLockView.patternChanges(mPatternLockView)
            .subscribe(new Consumer<PatternLockCompoundEvent>() {
                @Override
                public void accept(PatternLockCompoundEvent event) throws Exception {
                    if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_STARTED) {
                        Log.d(getClass().getName(), "Pattern drawing started");
                    } else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_PROGRESS) {
                        Log.d(getClass().getName(), "Pattern progress: " +
                                PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
                    } else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_COMPLETE) {
                        Log.d(getClass().getName(), "Pattern complete: " +
                                PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
                    } else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_CLEARED) {
                        Log.d(getClass().getName(), "Pattern has been cleared");
                    }
                }
            });
}
 
开发者ID:aritraroy,项目名称:PatternLockView,代码行数:51,代码来源:MainActivity.java

示例8: patternComplete

import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent; //导入依赖的package包/类
/**
 * Create an observable for only the pattern complete event of this {@code view}.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code view}.
 * Unsubscribe to free this reference.
 */
public static Observable<PatternLockCompleteEvent> patternComplete(PatternLockView patternLockView) {
    checkNotNull(patternLockView, "view == null");
    return new PatternLockViewCompleteObservable(patternLockView, false);
}
 
开发者ID:aritraroy,项目名称:PatternLockView,代码行数:11,代码来源:RxPatternLockView.java


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