Android Question Modal Forms like windows modal forms

Discussion in 'Android Questions' started by Eduardo Funabashi, Mar 5, 2015.

  1. Eduardo Funabashi

    Eduardo Funabashi Member Licensed 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
     
  2. NJDude

    NJDude Expert Licensed User

    You will have to "think" like Android and not like Windows, each activity is a separate process, so you have to adapt your code to that.
     
    schemer, Reviewnow and DonManfred like this.
  3. Eduardo Funabashi

    Eduardo Funabashi Member Licensed User

    Any ideas to achieve this task ?
     
  4. Devan

    Devan Member Licensed 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
     
  5. klaus

    klaus Expert Licensed 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.
     
  6. Joy Garcia

    Joy Garcia Member Licensed 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
     

    Attached Files:

  7. Claudio Oliveira

    Claudio Oliveira Active Member Licensed User

    Take a look at this
     
  8. MarkusR

    MarkusR Well-Known Member Licensed User

    one possibility
    Code:
    Dim options As List = Array("Red""Green""Blue")
        InputListAsync(options, 
    "Select Color"0False)
        
    Wait For InputList_Result (Index As Int)
        
    If Index <> DialogResponse.CANCEL Then
            
    Log("Selected color: " & options.Get(Index))
        
    End If
     
  9. Joy Garcia

    Joy Garcia Member Licensed User

    Thanks, for sharing... It helps a lot...
     

    Attached Files:

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice