Orientation and click events.

stevel05

Expert
Licensed User
Longtime User
I am having a problem with click events after an orientation change. The small attached program demonstrates this. I have a list view on starting, selecting an option displays some text. Clicking on the screen at this point around the text, fires a panel_click event, which can be seen in the log.

After an orientation change, I am going directly to display the data from within Activity_resume without going through the list again, the initially selected option is stored in a process variable. At this point clicking on the screen provides no panel_click events until I go back to the menu and choose another option.

I'm guessing I've missed something that needs saving or recalling. Please help.

Thanks

Steve
 

stevel05

Expert
Licensed User
Longtime User
Sorry I forgot to attach the file to the original post.
 

Attachments

  • testapp.zip
    6.9 KB · Views: 230
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The List is added above the ScrollView and it is not being hidden when Option <> 999. This code will fix it:
B4X:
Sub Activity_Resume
    If Option <> 999 Then 
        List1.Visible = False
        DisplayData(Option)
    Else
        DisplayList
    End If
End Sub

In order to find it you can set the color of each view and then see which view is the front most view.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Great Thanks, I was going round and round in circles with this. I will remember the colour trick.

Thanks very much

Steve
 
Upvote 0
Top