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