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.View
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.activityViewModels
import com.example.refactoredapp.R
@@ -176,19 +173,19 @@ class TestRightExpSample : Fragment() {
.commit()
}
private fun Button.disable() {
backgroundTintList = ContextCompat.getColorStateList(requireActivity(), R.color.gray)
isClickable = false
}
fun Button.enable() {
backgroundTintList = ContextCompat.getColorStateList(requireActivity(), R.color.purple_500)
// background.setColorFilter(Color.BLUE, PorterDuff.Mode.MULTIPLY)
isClickable = true
}
fun View.setAllEnabled(enabled: Boolean) {
isEnabled = enabled
if (this is ViewGroup) children.forEach { child -> child.setAllEnabled(enabled) }
}
// private fun Button.disable() {
// backgroundTintList = ContextCompat.getColorStateList(requireActivity(), R.color.gray)
// isClickable = false
// }
//
// fun Button.enable() {
// backgroundTintList = ContextCompat.getColorStateList(requireActivity(), R.color.purple_500)
//// background.setColorFilter(Color.BLUE, PorterDuff.Mode.MULTIPLY)
// isClickable = true
// }
//
// fun View.setAllEnabled(enabled: Boolean) {
// isEnabled = enabled
// if (this is ViewGroup) children.forEach { child -> child.setAllEnabled(enabled) }
// }
}