Sub IsrED1Validar_TextChanged (Old As String, New As String)
Dim b As FloatLabeledEditText
b = Sender
End Sub [/ CODE]
There isn't a single reason to use FloatLabeledEditText. Less powerful, not cross platform and cannot be extended.The event is raised by the EditText contained within the custom view then
From the question I did not intend that he wanted to build a multiplatform or that he wanted to extend functions and methods.There isn't a single reason to use FloatLabeledEditText. Less powerful, not cross platform and cannot be extended.
Why not point the OP to the correct solution?
I agree and actually do it in many cases, however in this case there is really not a single reason to use the old wrapped view. It is not like ListView vs. xCLV where ListView is a reasonable choice in some cases.In my opinion, answering the first question directly is useful. There are those who want to use a single platform view or an older view for their evaluations. By giving him the answer and the suggestion, I give him the opportunity to choose.
Not giving the direct answer to the question but only the suggestion to switch to XUi in that way I force him to do it because I don't give him other ways
No, your personalized view doesn't change. The sender is a simple EditText internal to the FloatLabeledEditText .[QUOTE = "Star-Dust, publicación: 746864, miembro: 101440"]
El evento es creativo por EditText contenido en la vista personalizada y luego
[CÓDIGO = b4x] Sub IsrED1Validar_TextChanged (antiguo como cadena, nuevo como cadena)
Dim b As EditText
b = remitente
End Sub [/ CODE]
[/ CITAR]
If I do this it would no longer be using the FloatLabeledEditText wrapper and I would be using the properties of the eddittext, so this would no longer serve me.
No, your personalized view doesn't change. The sender is a simple EditText internal to the FloatLabeledEditText .
If then you need to recall the personalized view is another matter. You have to use another method than the sender.
FloatTextField.Tag=FloatTextField
Sub CustomFloating_TextChanged (Old As String, New As String)
Dim b As EditText = sender
Dim PanelFloating as Panel = b.Parent
Dim Floating as FloatLabeledEditText = PanelFloating.Tag
'Dim Floating as B4XFloatTextField = PanelFloating.Tag
End Sub
As its a custom view you have to create a layout file for FloatLabeledEditText and load it. So declare that view in the global sub,I am using the ViewEX library and the FloatLabeledEditText view.
I get this error:
simuladorno_isred1validar_textchanged (java line: 1508)
java.lang.ClassCastException: android.widget.EditText cannot be cast to com.wrapp.floatlabelededittext.FloatLabeledEditText
How can i fix this?
I have an error trying to use this code:
B4X:Sub IsrED1Validar_TextChanged (Old As String, New As String) Dim b As FloatLabeledEditText b = Sender End Sub [/ CODE]
Sub Globals
Dim IsrED1Validar as FloatLabeledEditText
End Sub
Sub IsrED1Validar_TextChanged (Old As String, New As String)
IsrED1Validar.visible = false 'or something else you want
End Sub
Yes. It is explained here: [B4X] How to get <custom view here> from <CLV or any other container>I see, what I need is to retrieve the custom view, is there a way to do this or is it easier to do this with the XUI view ?
Dim x As B4XView = Sender
Dim TextField As B4XFloatTextField = x.Tag
Yes. It is explained here: [B4X] How to get <custom view here> from <CLV or any other container>
B4X:Dim x As B4XView = Sender Dim TextField As B4XFloatTextField = x.Tag
Dim x As B4XView = Remitente
Dim TextField As B4XFloatTextField = x.Tag
here I attachUpload your project (File - Export as zip).
it worked by removing the B4XView to B4XFloatTextFieldYes. It is explained here: [B4X] How to get <custom view here> from <CLV or any other container>
B4X:Dim x As B4XView = Sender Dim TextField As B4XFloatTextField = x.Tag
Dim x As B4XFloatTextField = Sender
You are correct. My mistake.it worked by removing the B4XView to B4XFloatTextField
I know this is not from the thread but I have not looked for a way to change the color of the underline, is there a thread where they explain this?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?