Commit 66e9f332 authored by shohboz's avatar shohboz

[FIX] MUS-207 Feature, fixed biometric bugs enable false

parent b0fbe4c3
...@@ -12,6 +12,7 @@ import com.mobiuz.app.dev.model.SharedPref ...@@ -12,6 +12,7 @@ import com.mobiuz.app.dev.model.SharedPref
import com.mobiuz.app.dev.ui.base.BaseFragment import com.mobiuz.app.dev.ui.base.BaseFragment
import com.mobiuz.app.dev.ui.global.ButtonClick import com.mobiuz.app.dev.ui.global.ButtonClick
import com.mobiuz.app.dev.ui.global.CONSTANTS import com.mobiuz.app.dev.ui.global.CONSTANTS
import com.mobiuz.app.dev.utils.extensions.getColorCompat
import com.mobiuz.app.dev.utils.extensions.showMessage import com.mobiuz.app.dev.utils.extensions.showMessage
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject import javax.inject.Inject
...@@ -59,8 +60,11 @@ class BiometricFragment : BaseFragment(R.layout.fragment_biometric) { ...@@ -59,8 +60,11 @@ class BiometricFragment : BaseFragment(R.layout.fragment_biometric) {
}) })
btnSwitch.setOnCheckedChangeListener { _, isChecked -> btnSwitch.setOnCheckedChangeListener { _, isChecked ->
val message = if(isChecked) "Biometric enabled" else "Biometric disabled" val message = if(isChecked) getString(R.string.biometric_enabled) else getString(R.string.biometric_disabled)
showToastMessage(message) showToastMessage(message)
btnNext.setTextColor(if(isChecked) getColorCompat(R.color.primary100) else getColorCompat(R.color.primary70))
btnNext.isEnabled = isChecked
pref.isUseFingerPrint = isChecked pref.isUseFingerPrint = isChecked
} }
} }
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="6dp"/>
<solid android:color="@color/grey20"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:radius="6dp"/>
<solid android:color="@color/grey20"/>
</shape>
</item>
<item android:state_pressed="false">
<shape>
<corners android:radius="6dp"/>
<solid android:color="@color/white100"/>
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/biometric_enable"
android:state_enabled="true"
/>
<item android:drawable="@drawable/biometric_disable"
android:state_enabled="false"
/>
</selector>
\ No newline at end of file
...@@ -113,20 +113,16 @@ ...@@ -113,20 +113,16 @@
android:layout_weight="0.7" android:layout_weight="0.7"
android:gravity="end|bottom"> android:gravity="end|bottom">
<com.google.android.material.button.MaterialButton <Button
android:id="@+id/btn_next" android:id="@+id/btn_next"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end" android:layout_gravity="end"
style="@style/BiometricButtonPrimary"
android:layout_marginEnd="@dimen/_12sdp" android:layout_marginEnd="@dimen/_12sdp"
android:paddingHorizontal="@dimen/_22sdp" android:paddingHorizontal="@dimen/_32sdp"
android:paddingVertical="@dimen/_10sdp" android:paddingVertical="@dimen/_10sdp"
android:textStyle="bold" android:text="@string/continuoue" />
android:textSize="16sp"
android:text="@string/continuoue"
android:textAllCaps="false"
android:textColor="@color/primary100"
app:backgroundTint="@color/white" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
tools:layout="@layout/fragment_profile" /> tools:layout="@layout/fragment_profile" />
<fragment <fragment
android:id="@+id/currentPasswordFragment" android:id="@+id/currentPasswordFragment"
android:name="com.mobiuz.app.dev.ui.settings.safety.password.CurrentPasswordFragment" android:name="com.mobiuz.app.dev.ui.settings.safety.password.ChangePasswordFragment"
android:label="CurrentPasswordFragment" /> android:label="CurrentPasswordFragment" />
<fragment <fragment
android:id="@+id/newPasswordFragment" android:id="@+id/newPasswordFragment"
...@@ -37,4 +37,16 @@ ...@@ -37,4 +37,16 @@
android:id="@+id/confirmPasswordFragment" android:id="@+id/confirmPasswordFragment"
android:name="com.mobiuz.app.dev.ui.settings.safety.password.ConfirmPasswordFragment" android:name="com.mobiuz.app.dev.ui.settings.safety.password.ConfirmPasswordFragment"
android:label="ConfirmPasswordFragment" /> android:label="ConfirmPasswordFragment" />
<fragment
android:id="@+id/oldPinFragment"
android:name="com.mobiuz.app.dev.ui.settings.safety.pin.OldPinFragment"
android:label="OldPinFragment" />
<fragment
android:id="@+id/newPinFragment"
android:name="com.mobiuz.app.dev.ui.settings.safety.pin.NewPinFragment"
android:label="NewPinFragment" />
<fragment
android:id="@+id/confirmNewPinFragment"
android:name="com.mobiuz.app.dev.ui.settings.safety.pin.ConfirmNewPinFragment"
android:label="ConfirmNewPinFragment" />
</navigation> </navigation>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment