We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
popupWidth
Hi,
first of all, thank you for the widget. I have found out that the widget shows the popup at wrong position if popupWidth is not specified.
private float getXPosition(SeekBar seekBar){ float val = (((float)seekBar.getProgress() * (float)(seekBar.getWidth() - 2 * seekBar.getThumbOffset())) / seekBar.getMax()); float offset = seekBar.getThumbOffset(); int textWidth = mPopupWidth; float textCenter = (textWidth/2.0f); float newX = val+offset - textCenter; return newX; }
The problem is that if you not specify popupWidth then mPopupWidth will have LayoutParam.WRAP_CONTENT set (a value is -2) and textCenter will be -1.
mPopupWidth
LayoutParam.WRAP_CONTENT
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
first of all, thank you for the widget. I have found out that the widget shows the popup at wrong position if
popupWidth
is not specified.The problem is that if you not specify popupWidth then
mPopupWidth
will haveLayoutParam.WRAP_CONTENT
set (a value is -2) and textCenter will be -1.The text was updated successfully, but these errors were encountered: