diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/NoneSecurityFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/NoneSecurityFragment.java
new file mode 100644
index 0000000..a8cb92b
--- /dev/null
+++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/NoneSecurityFragment.java
@@ -0,0 +1,38 @@
+package cy.agorise.crystalwallet.fragments;
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import butterknife.ButterKnife;
+import cy.agorise.crystalwallet.R;
+
+/**
+ * Created by xd on 1/18/18.
+ */
+
+public class NoneSecurityFragment extends Fragment {
+
+ public NoneSecurityFragment() {
+ // Required empty public constructor
+ }
+
+ public static NoneSecurityFragment newInstance() {
+ NoneSecurityFragment fragment = new NoneSecurityFragment();
+ Bundle args = new Bundle();
+ fragment.setArguments(args);
+ return fragment;
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ View v = inflater.inflate(R.layout.fragment_none_security, container, false);
+ ButterKnife.bind(this, v);
+
+ return v;
+ }
+}
diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/SecuritySettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/SecuritySettingsFragment.java
index 3850627..0407bcf 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/fragments/SecuritySettingsFragment.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/SecuritySettingsFragment.java
@@ -5,7 +5,6 @@ import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
-import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -17,6 +16,7 @@ import cy.agorise.crystalwallet.util.ChildViewPager;
/**
* Created by xd on 1/17/18.
+ * In this fragment the user should be able to select its preferred security option.
*/
public class SecuritySettingsFragment extends Fragment {
@@ -65,7 +65,7 @@ public class SecuritySettingsFragment extends Fragment {
public Fragment getItem(int position) {
switch (position){
case 0:
- //return new GeneralSettingsFragment();
+ return new NoneSecurityFragment();
case 1:
return new PinSecurityFragment();
case 2:
diff --git a/app/src/main/java/cy/agorise/crystalwallet/util/ChildViewPager.java b/app/src/main/java/cy/agorise/crystalwallet/util/ChildViewPager.java
index d01cbd5..fbac369 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/util/ChildViewPager.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/util/ChildViewPager.java
@@ -7,6 +7,8 @@ import android.view.MotionEvent;
/**
* Created by xd on 1/18/18.
+ * This ViewPager is intended to be used inside another ViewPager therefore it has the
+ * setSwipeLocked which disables or enables the swipe gesture.
*/
@@ -44,5 +46,4 @@ public class ChildViewPager extends ViewPager {
public boolean canScrollHorizontally(int direction) {
return !swipeLocked && super.canScrollHorizontally(direction);
}
-
}
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_none_security.xml b/app/src/main/res/layout/fragment_none_security.xml
new file mode 100644
index 0000000..3c4da4e
--- /dev/null
+++ b/app/src/main/res/layout/fragment_none_security.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_security_settings.xml b/app/src/main/res/layout/fragment_security_settings.xml
index 0c2f9ce..a70a4e7 100644
--- a/app/src/main/res/layout/fragment_security_settings.xml
+++ b/app/src/main/res/layout/fragment_security_settings.xml
@@ -29,6 +29,7 @@
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ app:tabSelectedTextColor="@color/black"
app:tabTextColor="@color/black"
android:animateLayoutChanges="true">
@@ -36,19 +37,19 @@
android:id="@+id/tabNone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="None" />
+ android:text="@string/none" />
+ android:text="@string/pin" />
+ android:text="@string/pattern" />
@@ -77,7 +78,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginStart="24dp"
- android:text="Use "Pocket" Security"
+ android:text="@string/use_pocket_security"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="@+id/vPocketSecurity"
@@ -106,8 +107,10 @@
android:id="@+id/etPocketPassword"
android:layout_width="0dp"
android:layout_height="wrap_content"
+ android:inputType="numberPassword"
app:layout_constraintTop_toBottomOf="@id/tvPocketSecurityUser"
app:layout_constraintStart_toStartOf="@id/tvPocketSecurity"
- app:layout_constraintEnd_toEndOf="@id/sPocketSecurity"/>
+ app:layout_constraintEnd_toEndOf="@id/sPocketSecurity"
+ tools:ignore="LabelFor" />
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3dae003..4829431 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -492,4 +492,8 @@
Current PIN
New PIN
Confirm PIN
+ Use \"Pocket\" Security
+ None
+ Pin
+ Pattern