Invalidate Not Redrawing View On Api 25
I have a custom view that extends LinearLayout. The view looks like progress bar with a little icon that moves on every click. the updating method is : public void setPointerOffset
Solution 1:
setting layout params to "mPointer" semms to fix it.
private void updateSlider() {
PercentFrameLayout.LayoutParams params = (PercentFrameLayout.LayoutParams) mPointer.getLayoutParams();
PercentLayoutHelper.PercentLayoutInfo info = params.getPercentLayoutInfo();
if (mPointerOffset < MIN_OFFSET)
mPointerOffset = MIN_OFFSET;
if (mPointerOffset > MAX_OFFSET)
mPointerOffset = MAX_OFFSET;
float percent = mPointerOffset * 0.01f;
info.startMarginPercent = percent;
mPointer.setLayoutParams(params);
}
Post a Comment for "Invalidate Not Redrawing View On Api 25"