Coder Social home page Coder Social logo

Comments (14)

KlausNie avatar KlausNie commented on June 19, 2024

This seems to be an issue with nestedScrolling. I started a fix, but I'm not yet done.

from surveykit.

KlausNie avatar KlausNie commented on June 19, 2024

This seems to be a harder problem than expected. The NumberPicker used in the android.widget.DatePicker does not support nested scrolling. So if the screen is too small for the datepicker and it has to scroll, the year selection just does not work.
I've tried to use MaterialDatePicker from com.google.android.material.datepicker.MaterialDatePicker ( https://github.com/material-components/material-components-android/blob/master/docs/components/Picker.md )but that is using Fragments, which I'm not using at all.

The next best thing I'll try to do is replace the DatePicker with a view that shows the selected date and on click I'll just open the DatePickerDialog which does not have this problem at all.

In my opinion it's not as pretty as having the date picker inline, but there is no way around.

from surveykit.

KlausNie avatar KlausNie commented on June 19, 2024

Also doesn't work with the dialog on a small enough phone: https://github.com/quickbirdstudios/SurveyKit/tree/feature/date-picker-scroll-issue

from surveykit.

KlausNie avatar KlausNie commented on June 19, 2024

Bug report: https://issuetracker.google.com/issues/115395128

from surveykit.

KlausNie avatar KlausNie commented on June 19, 2024

@rahul260792 Did you find this on an emulator or on real device?

from surveykit.

rahul260792 avatar rahul260792 commented on June 19, 2024

@KlausNie I found this on real device.

from surveykit.

KlausNie avatar KlausNie commented on June 19, 2024

What I found out is, that if the screen resolution is small, but the API level is 28+, this occurs. The issue at google is closed at the moment on google's side. I'l wait for a change there. Until then this issue is on hold.

from surveykit.

IHNEL avatar IHNEL commented on June 19, 2024

I got the same problem on Huawei Nova 3i, which is not small. Will you fix this issue @KlausNie

from surveykit.

KlausNie avatar KlausNie commented on June 19, 2024

The issue is: on phones where the screen is small enough so that the NumberPicker has to scroll, the number picker itself scrolls, but not the content. This happens in the dialog as well as in the inline DatePicker.
Currently, I have not found a way to fix this.
My next options will be to try to find a library that does not have this issue.

from surveykit.

IHNEL avatar IHNEL commented on June 19, 2024

Not quite sure about the root cause but I didn't use dialog in the survey. (Does this lib use dialog behind?)
When I move the datepicker out of SurveyView, it works fine and I can scroll.
I think there is sth wrong with the height of DatePicker view inside SurveyView.

from surveykit.

KlausNie avatar KlausNie commented on June 19, 2024

I thought so too, but then I tried the DatePickerDialog in the SurveyView and I had the same issue. How can the SurveyView impact that?

from surveykit.

zhubinsheng avatar zhubinsheng commented on June 19, 2024

Any updates? Encountered this problem on multiple mobile phones

from surveykit.

zhubinsheng avatar zhubinsheng commented on June 19, 2024

#32 (comment)
this work good on android 10 emulator with 300px X 300px

from surveykit.

zhubinsheng avatar zhubinsheng commented on June 19, 2024

work fail on 200px X 250px

from surveykit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.