@@ -0,0 +1,3415 @@
+package org.app.application.fragments;%0A%0Aimport android.os.Bundle;%0Aimport android.support.annotation.Nullable;%0Aimport android.support.v4.app.Fragment;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.widget.FrameLayout;%0Aimport android.widget.Toast;%0A%0Aimport org.app.application.R;%0Aimport org.app.material.widget.PatternView;%0A%0Aimport java.util.List;%0A%0Apublic class PatternViewFragment extends Fragment %7B%0A%0A    private final boolean patternVisibility = false;%0A    private final String correctPattern = %2224865%22;%0A%0A    private PatternView lockView;%0A%0A    @Nullable%0A    @Override%0A    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) %7B%0A        View view = inflater.inflate(R.layout.pattern_fr, container, false);%0A%0A        FrameLayout layout = (FrameLayout) view.findViewById(R.id.frameLock);%0A        layout.setBackgroundColor(0xFF64B5F6);%0A%0A        lockView = (PatternView) view.findViewById(R.id.patternLock);%0A        lockView.setInStealthMode(patternVisibility);%0A        lockView.setOnPatternListener(new PatternView.OnPatternListener() %7B%0A            @Override%0A            public void onPatternDetected(List%3CPatternView.Cell%3E pattern, String SimplePattern) %7B%0A                if (!SimplePattern.equals(correctPattern)) %7B%0A                    lockView.setDisplayMode(PatternView.DisplayMode.Wrong);%0A%0A                    Toast.makeText(getActivity(), %22Pattern is invalid %5Cn%22 + lockView.getPattern(), Toast.LENGTH_SHORT).show();%0A                    lockView.clearPattern();%0A                %7D else %7B%0A                    lockView.setDisplayMode(PatternView.DisplayMode.Correct);%0A                    Toast.makeText(getActivity(), %22Pattern is correct%22, Toast.LENGTH_SHORT).show();%0A                %7D%0A                super.onPatternDetected(pattern, SimplePattern);%0A            %7D%0A        %7D);%0A%0A        return view;%0A    %7D%0A%0A    /*@Nullable%0A    @Override%0A    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) %7B%0A        FrameLayout layout = new FrameLayout(getActivity());%0A        layout.setBackgroundColor(0xFFF0F0F0);%0A%0A        FrameLayout lockFrame = (FrameLayout) LayoutInflater.from(getActivity()).inflate(R.layout.pattern_fr, null);%0A        lockFrame.setLayoutParams(LayoutHelper.makeFrame(getActivity(), LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER));%0A        layout.addView(lockFrame);%0A%0A        lockView = (MaterialLockView) getActivity().findViewById(R.id.patternLock);%0A        lockView.setOnPatternListener(new MaterialLockView.OnPatternListener() %7B%0A            @Override%0A            public void onPatternDetected(List%3CMaterialLockView.Cell%3E pattern, String SimplePattern) %7B%0A                if (!SimplePattern.equals(correctPattern)) %7B%0A                    lockView.setDisplayMode(MaterialLockView.DisplayMode.Wrong);%0A%0A                    Toast.makeText(getActivity(), %22Pattern is invalid%22, Toast.LENGTH_SHORT).show();%0A                    lockView.clearPattern();%0A                %7D else %7B%0A                    lockView.setDisplayMode(MaterialLockView.DisplayMode.Correct);%0A                    Toast.makeText(getActivity(), %22Pattern is correct%22, Toast.LENGTH_SHORT).show();%0A                %7D%0A                super.onPatternDetected(pattern, SimplePattern);%0A            %7D%0A        %7D);%0A%0A        return layout;%0A    %7D*/%0A%7D

Update demo app