CustomDialog - Spinner control multi selection?

pbmi

Member
Licensed User
Longtime User
Hi,

I need to build a custom dialog with a number of controls, including a drop-down that allows the selection of multiple items.

Problem is I can't seem to find a spinner-like control which supports multiple selections - in the same way the InputMultiList dialog does (and I can't use a modal dialog within another modal dialog - eg InputMultiList within a customdialog)

The only workaround I can think of is to build my own "dialog" using scrollview (added to an activity), an editbutton and then InputMultiList in the editbutton_Click event.

Or is there something I've missed?

Thanks
 

pbmi

Member
Licensed User
Longtime User
Thanks.

I can put the scrollview panel together fine - but I can't seem to Add it to a customdialog.

Have I missed something?

Or do I need to create a "modal" scrollview panel? If so, how would I do that?

Sent from my GT-I9100 using Tapatalk 2
 
Upvote 0

pbmi

Member
Licensed User
Longtime User
OK, this works fine.

So my question now would be - what is the proper of managing such a custom view?

I was thinking to have a number of the custom views added to an activity to manage a sequence of dialogs.

Then to capture the Activity Keypress code and switch between views accordingly using the .BringToFront and .SendToBack methods.

But I can't seem to get these methods to work?

Or is there a better practice for doing this?
 
Upvote 0

pbmi

Member
Licensed User
Longtime User
Hi Erel,

It's a regular View.

I think I may have it worked this out using a combination of xxxView.RemoveView, xxxView.Visible and Activity_KeyPress:

In my Activity, I have a main View, 3 "dialog" views (nested) and a "screenGrayer" (which is a transparent, gray 100%x/100%y view used an overlay on previous dialog view).

I control all the views using:

1. an OK button (on each View) to save the selected values, etc

2. the Back button to display/remove the views in the Activity:

Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event

If KeyCode=KeyCodes.KEYCODE_BACK Then

If firstDialogView.Visible Then
' back to mainView
firstDialogView.RemoveView
screenGrayer.RemoveView
Return False

Else If secondDialogView.Visible Then
' back to firstDialogView
secondDialogView.RemoveView
firstDialogView.Visible=True
Return False

Else If thirdDialogView.Visible Then
' back to secondDialogView
thirdDialogView.RemoveView
secondDialogView.Visible=True
Return False

Else If mainView.Visible Then
' go back
Return True

End If

End If


End Sub

It seems to work ok. Is this the "right" way to manage the views, etc?

Thanks
 
Upvote 0

pbmi

Member
Licensed User
Longtime User
Will do. Thanks.

Just noticing that Keypress_back seems very sensitive - ie it jumps back sometimes twice or three times.

Is there a way to slow this down?

Sent from my GT-I9100 using Tapatalk 2
 
Upvote 0

pbmi

Member
Licensed User
Longtime User
Thanks, Erel.

I think I will try the multiple Activities approach you suggest

... the more I think about it, the easier it sounds to implement and maintain custom "dialog" views using Activities.


Sent from my GT-I9100 using Tapatalk 2
 
Last edited:
Upvote 0
Top