I have a seekbar in a listview, it is disabled to stop the user from changing the value whilst scrolling the list. I wish to enable it if the list item is long clicked, allow the user to change it and then disable it again.
Any suggestions.
I seem unable to access the seekbar from the activity as it is setup inside the ArrayAdapter to display a value from the database
I am able to fire a both a click event and a long click event for the list item, as the seekbar is currently disabled.
Solution
In the ArrayAdapter I set both enabled and focusable to false and added the SeekBar listener, setting the attributes to false allowed me to use the list item onItemClicked listener. Inside the onItemCLickListener I retreived the seekbar, set the attributes to true, this meant it could be slid up or down. I then disabled it after the adjustment had been made. code below
ArrayAdapter Snippet
this code is inside the creation of the list item, in which the seekbar is housed
AttachProgressUpdatedListener
this method attaches the listener to the seekbar, inside the arrayAdapter class
OnItemCLickListener
this snipped is from the activity which houses the list view.