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 4610060
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:04:40+00:00 2026-05-22T01:04:40+00:00

in my app i am trying to show a date picker in OnTouchEvent. When

  • 0

in my app i am trying to show a date picker in OnTouchEvent. When the date picker dialog appears it shows the Month in text such as May, June, July etc. When i select one among them it displays in numbers. I want it to be viewed as text itself. How to get it…..

Following is the part of my code

bd =(EditText)findViewById(R.id.dob);

final Calendar c = Calendar.getInstance();
        mYear = c.get(Calendar.YEAR);
        mMonth = c.get(Calendar.MONTH);
        mDay = c.get(Calendar.DAY_OF_MONTH);

private OnTouchListener bdListener = new View.OnTouchListener()
    {
      @Override
      public boolean onTouch(View v, MotionEvent event) 
      {
            showDialog(DATE_DIALOG_ID);
            return false;
      }
    };

private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() 
    {
      @Override
      public void onDateSet(DatePicker view, int year, int monthOfYear,int dayOfMonth) 
      {
         mYear = year;
         mMonth = monthOfYear;
         mDay = dayOfMonth;
         updateDisplay();
      }
    };

private void updateDisplay() 
    {
        bd.setText(new StringBuilder().append(mMonth+1).append("-").append(mDay).append("-").append(mYear));
    }
  • 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-05-22T01:04:40+00:00Added an answer on May 22, 2026 at 1:04 am

    So you have the month as an integer and you want the string representation.

    I think you need DateFormatSymbols

    monthText = new DateFormatSymbols().getMonths()[month];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to show graphs on my App using GraphView library. The code is
I am trying to show Thai Characters in my app PHP / MySQL, data
So i am trying to show this clan roster in my app with this
I am a beginner iPhone app developer and I am trying to show the
I am trying to create an android app which will show multiple web urls
I'm trying to make a status page on my app. This page should show
I'm making a 'post text' app and trying to update my database with name
I'm trying to show a small static google map in my app. I'm wondering
I've built browser app and trying to show 1920x1080 web page. I'm using ICS
in my app i am trying to show the current location in a map.

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.