refs #5652 Botones dinámicos

This commit is contained in:
Sergio De la torre 2023-09-19 07:20:32 +02:00
parent d93e34e13b
commit 400aa04046
1 changed files with 40 additions and 31 deletions

View File

@ -7,13 +7,16 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.textfield.TextInputEditText
import es.verdnatura.R
import es.verdnatura.databinding.ComponentCustomListDialogBinding
//import kotlinx.android.synthetic.main.component_custom_list_dialog.*
class CustomDialogList(context: Context) : Dialog(context, R.style.DialogTheme) {
private var binding: ComponentCustomListDialogBinding = ComponentCustomListDialogBinding.inflate(layoutInflater)
private var binding: ComponentCustomListDialogBinding =
ComponentCustomListDialogBinding.inflate(layoutInflater)
init {
setContentView(binding.root)
@ -49,6 +52,11 @@ class CustomDialogList (context: Context) : Dialog(context, R.style.DialogTheme)
return this
}
fun setValueVisibility(modifier: Int) {
binding.textinputlayoutUsername.visibility = modifier
}
fun getValueTwo(): String {
return binding.customDialogValueTwo.text.toString()
//return custom_dialog_value_two.text.toString()
@ -133,6 +141,7 @@ class CustomDialogList (context: Context) : Dialog(context, R.style.DialogTheme)
return this
}
fun hideTextInput(): CustomDialogList {
binding.textinputlayoutUsername.visibility = View.INVISIBLE