Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8376519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:26:58+00:00 2026-06-09T15:26:58+00:00

I’m sure there is a simple solution to this but I’m having a hard

  • 0

I’m sure there is a simple solution to this but I’m having a hard time with it. I’m trying to use the setDatePicker method the change the date on my DateDialog but I keep getting an index out of bounds error

solo.clickOnButton(0);
solo.setDatePicker(0, year, month, day);
solo.clickOnButton("Set");

The date picker is created in onCreateDialog method

    @Override
protected Dialog onCreateDialog(int id) {
    switch (id) {
    case START_DATE_ID:
        return new DatePickerDialog(this, bDateSetListener, bYear, bMonth,
                bDay);
    case END_DATE_ID:
        return new DatePickerDialog(this, eDateSetListener, eYear, eMonth,
                eDay);
    }
    return null;
}

The error I keep getting says “invalid index 0, size 0.” I don’t see a way that I can store the DatePickerDialog and just set/get the values either. It appears you just have to keep creating a new one. I’m sure someone has this working though. Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:26:59+00:00Added an answer on June 9, 2026 at 3:26 pm

    Now that I’ve been working with robotium a little more I see that the errors that it gives you are not really helpful(or in this case, the real issue). The error that I was getting actually had nothing to do with setting the DatePicker. In my test code I ended on an activity that wasn’t the test case’s starting activity, which works outside of testing. After I noticed this I simply went back to the starting activity and the test past…. The moral of the story is that Robotium errors aren’t very clear and you should look for other things that might be wrong in your application or flow to alleviate the odd errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.