From 1177c79105f5466c16e715f9b3e629e024b374cf Mon Sep 17 00:00:00 2001 From: sounddrill31 Date: Sat, 17 Aug 2024 04:11:22 +0530 Subject: [PATCH] Hide submit button if there is no change --- .../java/com/zeusinstitute/upiapp/Login.kt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/src/main/java/com/zeusinstitute/upiapp/Login.kt b/app/src/main/java/com/zeusinstitute/upiapp/Login.kt index 0479382..bad07f9 100644 --- a/app/src/main/java/com/zeusinstitute/upiapp/Login.kt +++ b/app/src/main/java/com/zeusinstitute/upiapp/Login.kt @@ -4,6 +4,8 @@ package com.zeusinstitute.upiapp import android.content.Context import android.os.Bundle +import android.text.Editable +import android.text.TextWatcher import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -11,6 +13,8 @@ import android.view.inputmethod.EditorInfo import android.widget.Button import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.Toolbar +import android.view.inputmethod.InputMethodManager +import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.navigation.fragment.findNavController import com.google.android.material.textfield.TextInputEditText @@ -34,6 +38,19 @@ class Login : Fragment() { val apikey = view.findViewById(R.id.apikey) val submitButton = view.findViewById