當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。