-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern Lock Added #2083
Pattern Lock Added #2083
Changes from all commits
d9979ed
42ecd87
3d289b2
5508c87
973c2f8
f0202f6
69bac27
0d0d969
8f9735b
f52a8f2
7874183
e12efec
2b5a0d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @davigonz Yes in some devices the cancel button does not fit in landscape orientation. So should I remove this view? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, if it does not fit in some devices, keep this landscape view 👍 |
||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:filterTouchesWhenObscured="true" | ||
android:gravity="center_horizontal" | ||
android:padding="@dimen/standard_padding"> | ||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerVertical="true" | ||
android:gravity="center_horizontal" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:id="@+id/header_pattern" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/pattern_enter_pattern" | ||
android:textColor="@android:color/black" | ||
android:textSize="16sp" /> | ||
|
||
<TextView | ||
android:id="@+id/explanation_pattern" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_horizontal" | ||
android:text="@string/pattern_configure_your_pattern_explanation" | ||
android:textAppearance="@android:style/TextAppearance.Small" | ||
android:textSize="14sp" /> | ||
|
||
<RelativeLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content"> | ||
|
||
<com.andrognito.patternlockview.PatternLockView | ||
android:id="@+id/pattern_lock_view" | ||
android:layout_width="250dp" | ||
android:layout_height="250dp" | ||
android:focusable="true" | ||
app:correctStateColor="@color/primary" | ||
app:dotCount="3" | ||
app:normalStateColor="@color/primary" | ||
app:wrongStateColor="@color/primary"> | ||
|
||
<requestFocus /> | ||
</com.andrognito.patternlockview.PatternLockView> | ||
|
||
<android.support.v7.widget.AppCompatButton | ||
android:id="@+id/cancel_pattern" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerVertical="true" | ||
android:layout_toRightOf="@id/pattern_lock_view" | ||
android:text="@string/common_cancel" | ||
android:theme="@style/Button.Primary" /> | ||
|
||
</RelativeLayout> | ||
|
||
</LinearLayout> | ||
|
||
</RelativeLayout> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:filterTouchesWhenObscured="true" | ||
android:gravity="center_horizontal" | ||
android:padding="@dimen/standard_padding"> | ||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerVertical="true" | ||
android:gravity="center_horizontal" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:id="@+id/header_pattern" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/pattern_enter_pattern" | ||
android:textColor="@android:color/black" | ||
android:textSize="16sp" /> | ||
|
||
<TextView | ||
android:id="@+id/explanation_pattern" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_horizontal" | ||
android:text="@string/pattern_configure_your_pattern_explanation" | ||
android:textAppearance="@android:style/TextAppearance.Small" | ||
android:textSize="14sp" /> | ||
|
||
<com.andrognito.patternlockview.PatternLockView | ||
android:id="@+id/pattern_lock_view" | ||
android:layout_width="280dp" | ||
android:layout_height="280dp" | ||
android:focusable="true" | ||
app:correctStateColor="@color/primary" | ||
app:dotCount="3" | ||
app:normalStateColor="@color/primary" | ||
app:wrongStateColor="@color/primary"> | ||
|
||
<requestFocus /> | ||
</com.andrognito.patternlockview.PatternLockView> | ||
|
||
<android.support.v7.widget.AppCompatButton | ||
android:id="@+id/cancel_pattern" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/common_cancel" | ||
android:theme="@style/Button.Primary" /> | ||
|
||
</LinearLayout> | ||
|
||
</RelativeLayout> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,10 +54,16 @@ | |
android:title="@string/prefs_camera_upload_behaviour_title" /> | ||
</PreferenceCategory> | ||
|
||
<PreferenceCategory android:title="@string/prefs_category_details"> | ||
<PreferenceCategory android:title="@string/prefs_category_security"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great, "Security" name is much better than "Details" for the section. |
||
<android.preference.CheckBoxPreference | ||
android:key="set_pincode" | ||
android:title="@string/prefs_passcode" /> | ||
/> | ||
|
||
<android.preference.CheckBoxPreference | ||
android:title="@string/prefs_pattern" | ||
android:key="set_pattern" | ||
/> | ||
</PreferenceCategory> | ||
|
||
<PreferenceCategory | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we use a third-party library we usually include the information in our THIRD_PARTY.txt file. Could you do the same with this library? You can have a look at the format we followed with other libraries in that file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in this picture for the floating action button dependency it is written that it is placed in libs/com-getbase-floatingactionbutton-1-10-0-exploded-aar. Similarly what should I write for the placed at point (for the pattern lock view dependency).What I mean is what does placed at signify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget this change for the moment, it seems that our THIRD_PARTY.txt is not properly updated, I will ping you when is ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davigonz Then I will commit the other changes. Thanks.