From 2307aa115ff24ed3bf248dc7c9d68457415ea4b2 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Tue, 25 Apr 2023 01:44:16 +0530 Subject: [PATCH] PasscodeActivity changes depending on the theme of the app --- .../main/java/com/mifos/api/model/LoginData.java | 4 ++-- .../mifosxdroid/passcode/PassCodeActivity.kt | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/mifosng-android/src/main/java/com/mifos/api/model/LoginData.java b/mifosng-android/src/main/java/com/mifos/api/model/LoginData.java index 06ce35f2428..4464cbd5908 100644 --- a/mifosng-android/src/main/java/com/mifos/api/model/LoginData.java +++ b/mifosng-android/src/main/java/com/mifos/api/model/LoginData.java @@ -1,6 +1,6 @@ package com.mifos.api.model; public class LoginData { - public String username ; - public String password ; + public String username; + public String password; } diff --git a/mifosng-android/src/main/java/com/mifos/mifosxdroid/passcode/PassCodeActivity.kt b/mifosng-android/src/main/java/com/mifos/mifosxdroid/passcode/PassCodeActivity.kt index e773579b292..2c9abb475c3 100644 --- a/mifosng-android/src/main/java/com/mifos/mifosxdroid/passcode/PassCodeActivity.kt +++ b/mifosng-android/src/main/java/com/mifos/mifosxdroid/passcode/PassCodeActivity.kt @@ -3,6 +3,9 @@ package com.mifos.mifosxdroid.passcode; import android.content.Intent import android.os.Bundle import android.view.View +import androidx.core.widget.NestedScrollView +import butterknife.BindView +import butterknife.ButterKnife import com.mifos.mifosxdroid.HomeActivity import com.mifos.mifosxdroid.R import com.mifos.mifosxdroid.SplashScreenActivity @@ -14,11 +17,19 @@ import com.mifos.mobile.passcode.utils.PasscodePreferencesHelper import com.mifos.utils.Constants class PassCodeActivity : MifosPassCodeActivity() { + + @BindView(R.id.cl_rootview) + lateinit var clRootView: NestedScrollView + private var currPassCode: String? = null private var isToUpdatePassCode: Boolean = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + + ButterKnife.bind(this) + clRootView.setBackgroundColor(android.R.attr.colorBackground) + intent?.let { currPassCode = it.getStringExtra(Constants.CURR_PASSWORD) isToUpdatePassCode = it.getBooleanExtra(Constants.IS_TO_UPDATE_PASS_CODE, false) @@ -28,16 +39,20 @@ class PassCodeActivity : MifosPassCodeActivity() { override fun showToaster(view: View?, msg: Int) { Toaster.show(view, msg, Toaster.SHORT) } + override fun startLoginActivity() { startActivity(Intent(this, SplashScreenActivity::class.java)) finish() } + override fun getLogo(): Int { return R.drawable.mifos_logo } + override fun getEncryptionType(): Int { return EncryptionUtil.FINERACT_CN } + override fun startNextActivity() { startActivity(Intent(this, HomeActivity::class.java)) }