Sunday, January 10, 2016

How to get the corresponding button listview




            


The effect you want to achieve is:
In ListView, there will be a button, I rewrite getView () implementation, monitor events also achieved a button (I wrote in the Adapter), will carry out an operation (in sub-thread) after button click, After the operation is over I want to set the visibility of the button's GONE, then set viewHolder.btn.setVisibility (View.GONE) in Handler handler, the question arises ... In doing so, the disappearance of the button is not my Click on that one, but the last of a listview.
I think that I did not get the line corresponding to the button, viewHolder.btn is getview drawn to the last button, it will be the last button was gone.
How accurate clicks of the button ....
Reply:
Top-up, seeking guidance ~~~~~
Reply:
You click on the response to an event which has a listview View the View the item that you can find that the layout View.findViewById control of what you want gone
Reply:
quote the second floor shen332401890 reply:
you click on listview response to the event, which has a View The View is the item of the layout View.findViewById you can find what you want gone that controls


But click on the button and listview listview onclick event does not trigger it
Reply:
quote the second floor shen332401890 reply:
you click on listview response to the event, which has a View The View is the item of the layout View.findViewById you can find what you want gone that controls



Thank you, has been resolved ...
Reply:
quote the second floor shen332401890 reply:
you click on listview response to the event, which has a View The View is the item of the layout View.findViewById you can find what you want gone that controls

If you want it all gone
Reply:
quote 5th floor stch1161 reply:
a reference to the second floor shen332401890 reply: you click on listview response to the event, which has a View The View is the item of your layout View .findViewById may find that you want gone for control
If you want it all gone


In response to events inside view.setVisibi GONE try
Reply:
quote, 6th Floor shen332401890 reply:
quote 5th floor stch1161 reply: Quote, 2nd Floor shen332401890 reply: you click on listview response to the event, which has a View The View The item that you can find the layout View.findViewById that you want gone for control
If you want it all gone

In response to events inside view.setVisibi GONE try


In response to an event buttons, only gone up and that a corresponding, not all of them.
Reply:
quote, 6th Floor shen332401890 reply:
quote 5th floor stch1161 reply: Quote, 2nd Floor shen332401890 reply: you click on listview response to the event, which has a View The View The item that you can find the layout View.findViewById that you want gone for control
If you want it all gone

In response to events inside view.setVisibi GONE try

Then I wrote a view arrays in geiview when each button is assigned to the array. Then the button's click event to a for loop, will view an array of all gone. You can solve
Reply:
If you want all gone why do not listview gone out of it?
Reply:
quote 9th floor shen332401890 reply:
If you want all gone why do not listview gone out of it?

Just wanted gone off the listview item in the amount of one button only
Reply:
quote 8th floor stch1161 reply:
Quote: quote, 6th Floor shen332401890 reply:

Quote 5th floor stch1161 reply: Quote, 2nd Floor shen332401890 reply: you click on listview response to the event, which has a View The View is the item of the layout View.findViewById you can find the control you want gone for
If you want it all gone

In response to events inside view.setVisibi GONE try

Then I wrote a view arrays in geiview when each button is assigned to the array. Then the button's click event to a for loop, will view an array of all gone. You can solve


Can you look at this code?
Reply:
quote the second floor shen332401890 reply:
you click on listview response to the event, which has a View The View is the item of the layout View.findViewById you can find what you want gone that controls


correct! Troubled days, finally resolved, thank you!
Reply:
I ask you how to solve it? Can share? I encountered the same problem you

No comments:

Post a Comment