I am modifying the UI of the openHAB android application.Sample image of what I was trying to achieve was given as image bellow.
Please note the width of the progress bar and the positioning of the thumb. The thumb will move only up to the edge of the progress bar. To achieve this work I used the setThubOffset() method in the SeekBar with the negative offset value and the offset works when the thumb moves.
When the progress value is changed the progress value will send to the server and with the response from the server ListView is updated with notifyDataSetChanged() call, the progress of the SeekBar will get modified, this time the position of the thumb changes and it moves out of the range of progress bar. No idea why the thumb moves outside even though the offset is negative.
The source code is like this
public View getView(int position, View convertView, ViewGroup parent) {
....
sliderSeekBar.setThumbOffset(-15);
....
sliderSeekBar.setProgress(...);
....
}
Can somebody tell what could be wrong?
Solved the issue. got help from here