Sergey_New Well-Known Member Licensed User Longtime User Oct 26, 2020 #1 The B4XDialog contains an EditText element. When focus is received, the keyboard overlaps the input field. How do I change the position of the B4XDialog?
The B4XDialog contains an EditText element. When focus is received, the keyboard overlaps the input field. How do I change the position of the B4XDialog?
M Mahares Expert Licensed User Longtime User Oct 26, 2020 #2 Sergey_New said: How do I change the position of the B4XDialog? Click to expand... Did you try this : Code: Dialog.PutAtTop = True Upvote 0
Sergey_New said: How do I change the position of the B4XDialog? Click to expand... Did you try this : Code: Dialog.PutAtTop = True
Sergey_New Well-Known Member Licensed User Longtime User Oct 26, 2020 #3 Mahares said: Did you try this : Click to expand... Checked. The dialogue doesn't move. Upvote 0
M Mahares Expert Licensed User Longtime User Oct 26, 2020 #4 Sergey_New said: Checked. The dialogue doesn't move. Click to expand... Did you put it after you initialized the dialog? If you tried : Dialog.PutAtTop = false and it moved, then you already have it at the top Can you show your code how you have the dialog set up Upvote 0
Sergey_New said: Checked. The dialogue doesn't move. Click to expand... Did you put it after you initialized the dialog? If you tried : Dialog.PutAtTop = false and it moved, then you already have it at the top Can you show your code how you have the dialog set up
Sergey_New Well-Known Member Licensed User Longtime User Oct 26, 2020 #5 Mahares said: Did you put it after you initialized the dialog? Click to expand... Yes. First when opening: B4X: Dialog.PutAtTop = False After placing the cursor on the EditText, need to move the dialog up. This code doesn't work: B4X: Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) '... Dialog.PutAtTop = True '... End Sub But even if this code worked, this offset might not be enough. Upvote 0
Mahares said: Did you put it after you initialized the dialog? Click to expand... Yes. First when opening: B4X: Dialog.PutAtTop = False After placing the cursor on the EditText, need to move the dialog up. This code doesn't work: B4X: Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) '... Dialog.PutAtTop = True '... End Sub But even if this code worked, this offset might not be enough.
M Mahares Expert Licensed User Longtime User Oct 26, 2020 #6 Sergey_New said: After placing the cursor on the EditText, need to move the dialog up. Click to expand... Try this Sergey. I have it in one of my projects and it worked for me: Code: Sub ime_HeightChanged (NewHeight As Int, OldHeight As Int) Dialog.base.Top = NewHeight-Dialog.base.Height End Sub By the way, that is the wrong place where you put this line in post5 Dialog.PutAtTop = True Last edited: Oct 26, 2020 Upvote 0
Sergey_New said: After placing the cursor on the EditText, need to move the dialog up. Click to expand... Try this Sergey. I have it in one of my projects and it worked for me: Code: Sub ime_HeightChanged (NewHeight As Int, OldHeight As Int) Dialog.base.Top = NewHeight-Dialog.base.Height End Sub By the way, that is the wrong place where you put this line in post5 Dialog.PutAtTop = True
Sergey_New Well-Known Member Licensed User Longtime User Oct 26, 2020 #7 Mahares said: Try this Sergey Click to expand... Thanks! It works. Mahares said: that is the wrong place Click to expand... And where should you insert it? Upvote 0
Mahares said: Try this Sergey Click to expand... Thanks! It works. Mahares said: that is the wrong place Click to expand... And where should you insert it?
M Mahares Expert Licensed User Longtime User Oct 26, 2020 #8 Sergey_New said: And where should you insert it? Click to expand... Code: Dialog.Initialize(Activity) Dialog.Title = "Moscow, Russia" Dialog.PutAtTop = True '<------- Upvote 0
Sergey_New said: And where should you insert it? Click to expand... Code: Dialog.Initialize(Activity) Dialog.Title = "Moscow, Russia" Dialog.PutAtTop = True '<-------
Sergey_New Well-Known Member Licensed User Longtime User Oct 26, 2020 #9 This is done in my code Upvote 0