Android Question Mystery? ( SOLVED! )

javiers

Active Member
Licensed User
Longtime User
The event associated with the views V12, V13, V14, ... (it is the same for all -Change) is triggered well in all areas of the screen except the one that appears in the image. I do not know why this happens. I have checked and there is no "overhead" view of V13 and V14 that intercepts the event.


B4X:
Sub Cambia_Click

'    Dim pulsado As Label = Sender
    pulsado = Sender
    Dim Tag As String
    Tag = pulsado.Tag
    Select True
        Case pulsado.Tag = "V12"
            PoneRecurso( V12, C12, "1")
        Case pulsado.Tag = "V13"
            PoneRecurso( V13, C13, "1")
        Case pulsado.Tag = "V14"

I appreciate your help in advance ....

A greeting
 

Attachments

  • Error.png
    Error.png
    70.6 KB · Views: 203

klaus

Expert
Licensed User
Longtime User
It would be much easier for the helpers if you posted your project or better a small project showing the problem.
Anyway, in your screenshot there is a view overlapping the two others, therefore it seems normal that the events are not fired.
But without seeing the whole code and layout it's impossible to give a concrete advice.
 
Upvote 0

Javier Donayre

Member
Licensed User
Try this:
B4X:
Dim pulsado As Label
    Dim Tag As String
    
    pulsado = Sender
    Tag = pulsado.Tag
    
    Select Tag
            Case "V12"
                    PoneRecurso( V12, C12, "1")
            Case "V13"
                    PoneRecurso( V13, C13, "1")
            Case "V14"
    End Select
 
Upvote 0

javiers

Active Member
Licensed User
Longtime User
First, thank you all for the responses.

Anyway, in your screenshot there is a view overlapping the two others, therefore it seems normal that the events are not fired.

The marked area is not a view, it is a drawing that I have added to the screenshot to show the area that does not produce the event.

The designer is like that. I have gone through the views by and I don't see any that overlap with them.

And you are right. I'm going to do a little project with this layout and see if the error repeats itself. If so, I include it ...



And you are right. I'm going to do a little project with this layout and see if the error repeats itself. If so, I include it ...
 

Attachments

  • Error2.png
    Error2.png
    87.7 KB · Views: 145
Upvote 0

stevel05

Expert
Licensed User
Longtime User
First check the tags are set correctly.
 
Upvote 0

javiers

Active Member
Licensed User
Longtime User
I think the tags are correct, since when I click on the view outside of that area that I have drawn, the event occurs. However, when the click is made in the leftmost area of the view, it does not fire.
 
Upvote 0

javiers

Active Member
Licensed User
Longtime User
Solved!
I have created a new layout and copied and pasted all the views. It works well!

Thank you all.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Solved!
I have created a new layout and copied and pasted all the views. It works well!

Thank you all.
Do you have both the .bal files ?
If true then
send to me​
end if
why?
want to dive deep in them to locate the mystery as I may face it next time in my complex project.

Regards,

Anand
 
Upvote 0

javiers

Active Member
Licensed User
Longtime User
Hello, finally the solution has not been to create a new layout. This too has failed again.

This layout is part of tabstrip. It happens that a panel (pnlTareas) of another tabstrip, which is draggable

B4X:
'To make the panel of tasks associated with a resource dragable on the map
Dim dv1 As DraggableView
dv1.Initialize (Activity, pnlTareas)

it was placed on top, and depending on its position, it invalidated the views event.
 
Upvote 0
Top