iOS Question control iCustomDialog position?

Status
Not open for further replies.

Misterbates

Active Member
Licensed User
I'm really liking the new iCustomDialog library https://www.b4x.com/android/forum/threads/custom-dialogs-with-icustomdialog-library.83526/

I was wondering if there was a way to control the dialog's vertical position on the display. I'm using it to update a text field and have created a panel with a text field, then displayed it with a title and OK/Cancel buttons. However, when clicking in the text field to adjust the value, the keyboard pops up and obscures the OK/Cancel buttons - worse, in portrait orientation there's no way to dismiss the keyboard. at the moment, I need to either rotate to landscape (to have a keyboard dismiss button show up) or use the workaround posted by Erel of making the panel slightly larger than the text field and capturing the Panel_Click event to ResignFocus from the text field.

I'd like to have the dialog show at the top of the display, rather than centered in the middle.

Alternatively, would be great if the dialog could be moved up the display once text entry is complete?
 

Misterbates

Active Member
Licensed User
Please look at this tutorial or this other one. Either you calc Keyboard or you provide a way to hide it.

Thanks for the options!

Option 1 looks not possible, since to use it I'd need to be able to reposition the CustomDialog - and that's exactly why I posted my question in the first place :)
Option 2 looks like it may work - I'll investigate adding a keyboard accessory view.
 
Upvote 0

Misterbates

Active Member
Licensed User
Some progress, but still issues. I added a keyboard accessory that calls ResignFocus on the textfield to hide the keyboard, but due to the position of the CustomDialog, adding the accessory obscures the textfield - I can hide the keyboard, but now can't see what's being edited!

Really, I need a way to move the CustomDialog higher up the display. To show the CustomDialog, I use
B4X:
Dim sf As Object = d.ShowAsync("Title", "Positive", "Cancel", "", false)
and looking in the debugger, sf shows
B4X:
Description: <SCLAlertView: 0x15a32c00>
.

Is there any way I can use NativeObject to move the dialog higher?
 
Upvote 0
Status
Not open for further replies.
Top