E enonod Well-Known Member Licensed User Longtime User Mar 8, 2013 #1 With regard to EditText View, it seems that using Gravity with Hint Text causes the Hint Text to be obscured somehow. I cannot see that I have done anything wrong and have tried it in reverse order to no avail. Removing Gravity cures the problem. Any suggestions please or is it a bug? Code: Copy eName.Initialize("") eName.Hint="Enter Name" eName.Gravity=Gravity.CENTER
With regard to EditText View, it seems that using Gravity with Hint Text causes the Hint Text to be obscured somehow. I cannot see that I have done anything wrong and have tried it in reverse order to no avail. Removing Gravity cures the problem. Any suggestions please or is it a bug? Code: Copy eName.Initialize("") eName.Hint="Enter Name" eName.Gravity=Gravity.CENTER
mangojack Expert Licensed User Longtime User Mar 8, 2013 #2 enonod .. not seeing any problem here .. Upvote 0
E enonod Well-Known Member Licensed User Longtime User Mar 8, 2013 #3 I now agree with you, however, I placed the code out of context. In fact the code I posted is called from a sub which contains the preceding code... Code: Copy eName.InputType=eName.INPUT_TYPE_TEXT and it is that which is causing the problem, which disappears when it is commented out. The problem can also be solved by removing the Gravity, which is what threw me. So unless I have really got into a twist the problem exists, caused by something else but cured either way. [EDIT]I also notice that using Gravity as shown the text is centred horizontally but is above centre vertically. Last edited: Mar 8, 2013 Upvote 0
I now agree with you, however, I placed the code out of context. In fact the code I posted is called from a sub which contains the preceding code... Code: Copy eName.InputType=eName.INPUT_TYPE_TEXT and it is that which is causing the problem, which disappears when it is commented out. The problem can also be solved by removing the Gravity, which is what threw me. So unless I have really got into a twist the problem exists, caused by something else but cured either way. [EDIT]I also notice that using Gravity as shown the text is centred horizontally but is above centre vertically.
E enonod Well-Known Member Licensed User Longtime User Mar 9, 2013 #4 Bump. To bring this together... eName is a Global EditText. The following hides the Hint message but removing either line 2 or line 4 solves it. I presume this is not by design and I find nothing suggesting the order is critical. Is it a bug or me? Code: Copy eName.Initialize("") eName.InputType=eName.INPUT_TYPE_TEXT eName.Hint="Enter Name" eName.Gravity=Gravity.CENTER Upvote 0
Bump. To bring this together... eName is a Global EditText. The following hides the Hint message but removing either line 2 or line 4 solves it. I presume this is not by design and I find nothing suggesting the order is critical. Is it a bug or me? Code: Copy eName.Initialize("") eName.InputType=eName.INPUT_TYPE_TEXT eName.Hint="Enter Name" eName.Gravity=Gravity.CENTER
mangojack Expert Licensed User Longtime User Mar 9, 2013 #5 enonod .. is the EditText created in Designer or by Code I Have a Layout with a single EditText 'eName' , by removing the eName.Initialize line everything is OK ? Code: Copy Sub Globals Dim eName As EditText End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("main") ' eName.Initialize("") ... not needed eName.InputType=eName.INPUT_TYPE_TEXT eName.Hint="Enter Name" eName.Gravity=Gravity.CENTER End Sub If I include the initialize line I get the same problem that you are reporting .. Hope this helps Cheers mj Upvote 0
enonod .. is the EditText created in Designer or by Code I Have a Layout with a single EditText 'eName' , by removing the eName.Initialize line everything is OK ? Code: Copy Sub Globals Dim eName As EditText End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("main") ' eName.Initialize("") ... not needed eName.InputType=eName.INPUT_TYPE_TEXT eName.Hint="Enter Name" eName.Gravity=Gravity.CENTER End Sub If I include the initialize line I get the same problem that you are reporting .. Hope this helps Cheers mj
E enonod Well-Known Member Licensed User Longtime User Mar 9, 2013 #6 I don't use designer this is code and so initialize is required. I presume that otherwise you get the same as me. [Edit] sorry did not see the bottom of your post. Thanks for testing. I'll leave it a bit longer and see if Erel turns up. Upvote 0
I don't use designer this is code and so initialize is required. I presume that otherwise you get the same as me. [Edit] sorry did not see the bottom of your post. Thanks for testing. I'll leave it a bit longer and see if Erel turns up.
Erel B4X founder Staff member Licensed User Longtime User Mar 12, 2013 #7 Wasn't this question answered here: http://www.b4x.com/forum/bugs-wishlist/27163-bug-gravity-input_type-edittext.html#post157364 ? Upvote 0
Wasn't this question answered here: http://www.b4x.com/forum/bugs-wishlist/27163-bug-gravity-input_type-edittext.html#post157364 ?
E enonod Well-Known Member Licensed User Longtime User Mar 12, 2013 #8 Yes! This post occurred before, and gave rise to the bug report, once it had been confirmed. Upvote 0