Skip to content
New issue

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

Problem when add collapse calendar view to scrollview #14

Open
andothanh1307 opened this issue May 14, 2016 · 0 comments
Open

Problem when add collapse calendar view to scrollview #14

andothanh1307 opened this issue May 14, 2016 · 0 comments

Comments

@andothanh1307
Copy link

andothanh1307 commented May 14, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant