pliroforikos Active Member Licensed User Jan 5, 2021 #1 Goodday to all I'm trying to make something like this with my text boxes. White border and text without the line underneath but i'm only did this: The first textbox is B4XFloatTextField which it has attributes for border and colors in designer the second is a simple EditText field which it hasn't attributes Is there any solution? Thank you
Goodday to all I'm trying to make something like this with my text boxes. White border and text without the line underneath but i'm only did this: The first textbox is B4XFloatTextField which it has attributes for border and colors in designer the second is a simple EditText field which it hasn't attributes Is there any solution? Thank you
Erel B4X founder Staff member Licensed User Longtime User Jan 6, 2021 #2 You can remove this line by setting it to be transparent: https://www.b4x.com/android/forum/threads/change-edittext-colors.87653/#content If I remember correctly, B4XFloatTextField will remove the border from the base panel. If so then either add it programmatically: TextField.mBaseSetColorAndBorder, or put it in a panel with border. Upvote 0
You can remove this line by setting it to be transparent: https://www.b4x.com/android/forum/threads/change-edittext-colors.87653/#content If I remember correctly, B4XFloatTextField will remove the border from the base panel. If so then either add it programmatically: TextField.mBaseSetColorAndBorder, or put it in a panel with border.
pliroforikos Active Member Licensed User Jan 6, 2021 #3 The Sub SetBackgroundTintList(View As View,Active As Int, Enabled As Int) expecting a View not a B4XFloatTextField and i cant declare it as B4XView so i cant use it to make underneath line as transparent. Any other solution for B4XFloatTextField ? TextField.mBase.SetColorAndBorder works as expected only for base panel. Upvote 0
The Sub SetBackgroundTintList(View As View,Active As Int, Enabled As Int) expecting a View not a B4XFloatTextField and i cant declare it as B4XView so i cant use it to make underneath line as transparent. Any other solution for B4XFloatTextField ? TextField.mBase.SetColorAndBorder works as expected only for base panel.
M Mahares Expert Licensed User Longtime User Jan 6, 2021 #4 pliroforikos said: expecting a View not a B4XFloatTextField and i cant declare it as B4XView Click to expand... Did you try to expose the native view like this and pass it as a parameter in Sub SetBackgroundTintList(View As View,Active As Int, Enabled As Int) : Code: Copy Dim et As EditText = B4XFloatTextField1.TextField Upvote 0
pliroforikos said: expecting a View not a B4XFloatTextField and i cant declare it as B4XView Click to expand... Did you try to expose the native view like this and pass it as a parameter in Sub SetBackgroundTintList(View As View,Active As Int, Enabled As Int) : Code: Copy Dim et As EditText = B4XFloatTextField1.TextField
Erel B4X founder Staff member Licensed User Longtime User Jan 6, 2021 #5 Note that if it is a password field and you haven't removed the reveal button then you need to handle the PasswordRevealChanged event and do it again as the native text field is recreated. Upvote 0
Note that if it is a password field and you haven't removed the reveal button then you need to handle the PasswordRevealChanged event and do it again as the native text field is recreated.
pliroforikos Active Member Licensed User Jan 6, 2021 #6 Thank you both. Now it works perfect and i tested the code below which is working as well B4X: Copy Sub SetTextfields For Each v As View In Root.GetAllViewsRecursive If v Is EditText Then B4XPages.MainPage.SetBackgroundTintList(v, Colors.Transparent, Colors.Transparent) End If Next End Sub Thank you very much both and i wish you happy and covid free new year. Upvote 0
Thank you both. Now it works perfect and i tested the code below which is working as well B4X: Copy Sub SetTextfields For Each v As View In Root.GetAllViewsRecursive If v Is EditText Then B4XPages.MainPage.SetBackgroundTintList(v, Colors.Transparent, Colors.Transparent) End If Next End Sub Thank you very much both and i wish you happy and covid free new year.