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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:10:45+00:00 2026-06-15T21:10:45+00:00

I am developing an app that requires mee to allow user to draw any

  • 0

I am developing an app that requires mee to allow user to draw any text on an image shown.
I am not able to get the correct term to search the web- should i call it sensing or call it touch event or what it is a gesture application.
Precisely i want to enable the user to scribble any thing or draw any thing on the image.
I have few ideas like it can use canvas or some overlay element But nothing concrete.

P.S. :
I am using the android 2.2 as target.
I am new to android development.
Please 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-15T21:10:46+00:00Added an answer on June 15, 2026 at 9:10 pm

    Well Answering my own first question 🙂
    Actually i could not get directly to the solution – but atleast found 2 ways out.

    1. You can take 2 imageview’s. Allocate the 1st Imageview ( ref it as imageview1 ) with the image source and then place the 2nd Imageview ( ref it as imageview2 ) on imageview1 , such a way that it covers entire screen ( fill parent – both height and width ) .
      Now in .java file , assign imageview2.setOnTouchListener(this); and override the onLoad() method as per your need . Eg.

      `public boolean onTouch(View v, MotionEvent event) {

      int action = event.getAction();
      switch (action) {
      case MotionEvent.ACTION_DOWN:
      
          oldx = downx = event.getX();
          oldy = downy = event.getY();            
          break;
      
      case MotionEvent.ACTION_MOVE:
      
          downx = event.getX();
          downy = event.getY();
      
          canvas.drawLine(oldx, oldy, downx, downy, paint);
          imgvw.invalidate();
      
          oldx = downx ;
          oldy = downy ;          
          break;
      
      case MotionEvent.ACTION_UP:
          upx = event.getX();
          upy = event.getY();
      
          canvas.drawLine(oldx, oldy, upx, upy, paint);
          imgvw.invalidate();
      
          break;
      case MotionEvent.ACTION_CANCEL:
                       // SOME CODE THAT YOU WANNA USE 
          break;
      default:
          break;
      }
      return true;
      

      }`

    Paint paint = new Paint() ;

    paint.setColor(Color.GREEN);

    This will help to draw on imageview2 but it would seem as if it is been drawn on imageview1 🙂

    1. The second method is pretty straight forward –
      Create a new class ( cal it MyImageview ) extending ImageView .
      Now in your activity class, create an object of MyImageView and setContentView(myImageView(this)) and attach a setOnTouchListener(this); , implement the onTouch method as specified above and this will work fine .
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an app that requires to get the IMSI. I use: TelephonyManager
I'm new to iOS programming and is developing an app that requires the user's
I'm developing a app that requires sync with the server app every 5 minutes...
i'm developing an app that has a jtable and user could start a download.
I am developing a commercial MVC2 app that requires a grid that has callback
An application I'm developing requires that the app main a local list of things,
I am developing an android app that requires multiple default passwords to be stored.
I'm planning on developing an app for android that requires a back-end server to
I'm currently developing app that requires storage of lots of information from different controls.
I am developing an app in windows 8 that requires camera to capture picture.

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.