commented unwanted methods.
This commit is contained in:
@@ -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) }
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user