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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:41:14+00:00 2026-06-01T20:41:14+00:00

I am wanting to take a little calendar image and write the date and

  • 0

I am wanting to take a little calendar image and write the date and month on it. This will be displayed many times in a list view, so I am looking for the optimum way to do it.

Below works great, is there a better way:

ImageView image = (ImageView) findViewById(R.id.imageView2);
try {
    // Load the png image into a bitmap
    Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.calendar_empty);
    // Have to copy the bitmap so it is mutable
    mBitmap = mBitmap.copy(Bitmap.Config.ARGB_8888, true);
    // Create a canvas from the bitmap to draw on
    Canvas canvas = new Canvas(mBitmap);
    Paint paint = new Paint();
    paint.setColor(Color.BLACK);
    paint.setTextSize(12);
    paint.setAntiAlias(true);
    canvas.drawText("Sept", 11, 26, paint);
    paint.setTextSize(18);
    canvas.drawText("29", 14, 42, paint);
    // Display the results on the screen
    image.setImageDrawable(new BitmapDrawable(this.getResources(), mBitmap));
} catch (Exception e) {
    e.printStackTrace ();
}
  • 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-01T20:41:16+00:00Added an answer on June 1, 2026 at 8:41 pm

    Why don’t you just take the ImageView, and put a TextView on it as an overlay for the title, inside a layout container that enables this – e.g. RelativeLayout or FrameLayout?

    I had several projects in which I wrote titles on images this way, there were no problems with this approach.

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

Sidebar

Related Questions

This PHP code below will take an image and add the word _thumb in
I am wanting to take an image that I created by changing pixel data
I am unsure of what path I should take for what I am wanting
I am wanting to display one list element at a time. Ideally, the first
I am wanting to take a string of say the following: Guiness Harp Holy
I'm wanting to read a list of forenames and surnames from a plist I
I have a file I am putting into a list and I am wanting
Take the example of wanting to have a Latest news items sidebar on every
I've been wanting to work on this application for about a year now. I
morning. I am wanting to take all segments of php code out of a

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.