commented unwanted methods.

This commit is contained in:
vsuryakumar
2023-01-31 15:25:16 +05:30
parent 0b3490548e
commit 96d7ab0e57

View File

@@ -7,9 +7,6 @@ import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.Button
import androidx.core.content.ContextCompat
import androidx.core.view.children
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
import com.example.refactoredapp.R import com.example.refactoredapp.R
@@ -176,19 +173,19 @@ class TestRightExpSample : Fragment() {
.commit() .commit()
} }
private fun Button.disable() { // private fun Button.disable() {
backgroundTintList = ContextCompat.getColorStateList(requireActivity(), R.color.gray) // backgroundTintList = ContextCompat.getColorStateList(requireActivity(), R.color.gray)
isClickable = false // isClickable = false
} // }
//
fun Button.enable() { // fun Button.enable() {
backgroundTintList = ContextCompat.getColorStateList(requireActivity(), R.color.purple_500) // backgroundTintList = ContextCompat.getColorStateList(requireActivity(), R.color.purple_500)
// background.setColorFilter(Color.BLUE, PorterDuff.Mode.MULTIPLY) //// background.setColorFilter(Color.BLUE, PorterDuff.Mode.MULTIPLY)
isClickable = true // isClickable = true
} // }
//
fun View.setAllEnabled(enabled: Boolean) { // fun View.setAllEnabled(enabled: Boolean) {
isEnabled = enabled // isEnabled = enabled
if (this is ViewGroup) children.forEach { child -> child.setAllEnabled(enabled) } // if (this is ViewGroup) children.forEach { child -> child.setAllEnabled(enabled) }
} // }
} }