Android Question Modal Forms like windows modal forms

Eduardo Funabashi

Member
Licensed User
Longtime User
Hello,
In my program I need to execute others activities / layouts to the user select some items and then continue the program.
See example:
code ......
code .......
' here I need to show to the user another layout to select an item
If REG_PEGA_PREPARO = 1 Then
StartActivity("Pega_Preparo") ' layout to the user select an item
End If

code ......
code .......

' here I need to show the user another layout to select another item
If REG_PEGA_PESO = 1 Then
StartActivity("Pega_Peso") ' layout to the user select another item
End If

code ......
code .......
' then with de data selected by the user, program continues...

My problem is that when I execute StartActivity("Pega_Preparo"), code continues till end of the Sub.
But I need code to wait for StartActivity("Pega_Preparo") be closed to program continues.

How to do this job ?

Regards
 

Devan

Member
Licensed User
Longtime User
I think you should start new activity module than once user input back to main activity. Im still new to programming. Try to do more research or ask Erel. He knows better.
Take care
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
As NJDude already said, you need to switch from top down programing to event driven programing.
Depending on what data the user must enter the principle might be different.
You should explain more in detail your problem to get concrete advices.
 
Upvote 0

JhoeyBoy

Member
Licensed User
Longtime User
Hi, I would like to ask how to make a floating form same the attached picture. which the previous form is visible, it's like a modal form in windows applications.


Joey
 

Attachments

  • Screenshot_2018-03-02-07-01-34.png
    Screenshot_2018-03-02-07-01-34.png
    79.5 KB · Views: 243
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
Hi, I would like to ask how to make a floating form same the attached picture. which the previous form is visible, it's like a modal form in windows applications.
Joey
one possibility
B4X:
    Dim options As List = Array("Red", "Green", "Blue")
    InputListAsync(options, "Select Color", 0, False)
    Wait For InputList_Result (Index As Int)
    If Index <> DialogResponse.CANCEL Then
        Log("Selected color: " & options.Get(Index))
    End If
 
Upvote 0
Top