android-collapse-calendar-view icon indicating copy to clipboard operation
android-collapse-calendar-view copied to clipboard

Problem when add collapse calendar view to scrollview

Open andothanh1307 opened this issue 8 years ago • 0 comments

I need to add your collapse calendar view in a scroll view. So i create a custom scrollview like this:

`public class ResizableScrollView extends ScrollView {

private ResizeManager mResizeManager;

public ResizableScrollView(Context context) {
    super(context);
}

public ResizableScrollView(Context context, AttributeSet attrs) {
    super(context, attrs);
}

public ResizableScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
}

public void setUpResizeManager(CollapseCalendarView calendarView){
    mResizeManager = new ResizeManager(calendarView);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
    return mResizeManager.onInterceptTouchEvent(ev);
}

@Override
public boolean onTouchEvent(@NonNull MotionEvent event) {
    super.onTouchEvent(event);

    return mResizeManager.onTouchEvent(event);
}

@Override
protected void dispatchDraw(@NonNull Canvas canvas) {
    mResizeManager.onDraw();

    super.dispatchDraw(canvas);
}

@Override
protected void onDetachedFromWindow() {
    super.onDetachedFromWindow();

    mResizeManager.recycle();
}

}`

When i ran and scrolled , it appeared a small space like below picture. 42b208ea999114963893822dd2f0ccc72d586625fe599b6f50 pimgpsh_fullsize_distr

I don't know why. Please help me! This is my project: https://www.dropbox.com/s/v75zqklgkg3hx1g/collapse_calendar.zip?dl=0

andothanh1307 avatar May 14 '16 10:05 andothanh1307