1. Download our Official Android App: Forums for Android!

DatePicker for API 10

Discussion in 'Android Development' started by Gregary Boyles, Oct 3, 2017.

  1. Gregary Boyles

    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    30
    Joined:
    Oct 1, 2017

    Oct 1, 2017
    30
    0
    15
    Android Studio is telling me that DatePicker is only available in API 11 and above.

    I need one for API 10!

    Is there an equivalent to DatePicker for API 10 or do I have to re-invent the wheel with spinners
     

    Advertisement

  2. loonycgb2

    loonycgb2 Android Enthusiast
    Rank:
    None
    Points:
    108
    Posts:
    381
    Joined:
    Dec 4, 2013

    Dec 4, 2013
    381
    289
    108
    Male
    CNC Machinist
    Houston, TX
    set a range using init datepicker
     
  3. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,843
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,843
    11,443
    1,988
    Male
    Software developer
    South West of England
    The DatePicker class was added in API level 1.

    https://developer.android.com/reference/android/widget/DatePicker.html

    btw that page gives you a nice view of the class methods per API version. Simply adjust the API level to see what's available.

    Some methods will have been deprecated. What's your exact error, and please show your code.
     
  4. Gregary Boyles

    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    30
    Joined:
    Oct 1, 2017

    Oct 1, 2017
    30
    0
    15
    Android Studio said that I needed API 11 to use it where as I had my project set on API 10.

    And there is no info on the Android site that tells me what functions are deprecated in what API versions.

    It's just to much hassle.

    I am over battling with Android Studio about it.

    I re-invented the wheel and made myself a spinner with all possible dates in the year - nice and simple and no API version conflicts.
     

Share This Page

Loading...