Android Question App user cannot change of button name ( B4XPage )

Picon

Member
Licensed User
Hello everyone!

To do this, I use 2 objects: Button and EditText.
In the Visual Designer, I set both of these objects in the same place in such a way that the Button is under EditText.
In normal operation of the application, EditText is hidden (EditText.Visable = False)
In the Button1_LongClick function, I change the EditText.Visable value to True - I want the user to enter their name for the Button there.

The problem is that the EditText object is still not available.
It is covered by a Button and cannot be used.
I can see EditText and can use it only when I hide Button1.

In Visual Designer, the "Bring to Front" command for EditText and "Send to Back" for Button1 do not work.

The same code, works fine in iOS (mode: B4XPage). (???)

The above algorithm works very well for me in the older version of the Android application made without B4XPage.

Anyone have any idea?


B4X:
Private Sub Button1_LongClick  
    EditText1.Visible = True     '<------------ this line works, but the object remains under Button1
    EditText1.Text = Button1.Text
    Button1.Text = ""
End Sub
 

Picon

Member
Licensed User
When you set
EditText1.Visible = True
set
Button1.Visible = False.
And vice versa.
Thanks for the answer Klaus :)
Yes, this is a last resort, but the "hole" effect of the button breaks the visual effect of the user interface. : /
It was just what I wanted to avoid.
-----------------
And I'm still curious why it works in iOS and in the older application (before B4XPage)
 
Upvote 0

Picon

Member
Licensed User
I don't see how it can be anything to do with B4XPages. Check the Elevation values. The default Elevation of the Button is probably higher than that of the EditText
Elevation values???
what is this value? where it is?

For me it has no relation either, but in the previous application (without B4XPage) the EditText1 object appears in the foreground and Button1 below it - and I do not have to hide Button1 to use EditText1.
 
Last edited:
Upvote 0

agraham

Expert
Licensed User
Longtime User
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Put your EditText on a Panel and set the Panels background color to transparent and its Elevation to 10.

1646661292567.png
 
Upvote 0
Top