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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:14:33+00:00 2026-06-08T17:14:33+00:00

i have made a canvas and draw an image on canvas i have also

  • 0

i have made a canvas and draw an image on canvas i have also draw some text on

canvas. both the things image and text are now independent. i want that when i

draw text it should b printed on image. and i can save the image and text which is now

on image and i want to send image with text in another activity.


here is my code:

 @Override

  protected Void onDraw(Canvas canvas) {

   Bitmap b = BitmapFactory.decodeResource(getResources(),R.drawable.ic);

   canvas.drawBitmap(b,10,10,null);

canvas,drawText("hello this is my image",10,10,null);

   }
  • 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-08T17:14:34+00:00Added an answer on June 8, 2026 at 5:14 pm

    @sachit. As you know in a real life, the Canvas is only a brush, that you can use to draw the on the paper. Here the paper is your image itself.

    So don’t worry. Just send the Bitmap b, which is now the image with your text.

    And for sending you can convert the b to bytearray
    like

    ByteArrayOutputStream stream = new ByteArrayOutputStream();
                b.compress(Bitmap.CompressFormat.JPEG, 90, stream);
            ByteArray byteArray = stream.toByteArray();
    

    Now you can send the byteArray to another activity..
    Cheers…….

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

Sidebar

Related Questions

i need draw some stuff on canvas and then lick on each. I made
I have made simple example of using canvas and then I saw that my
I have made a canvas and I'm setting an image on it, but I
I have made a jQuery toggle for a menu that I had in mind.
i have made an application having entity framewrok. It is wpf application, now it
I have made a code that read data from flash Nand (without filesystem). fd
I have made a String[] array by using String.split(.) . I am now trying
Think that I have many activities,and all I want is this: I have a
I'm trying to draw text without antialiasing on a canvas in Android. The font
I want to load a PNG image encoded in Base64 to canvas element. I

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.