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

  • Home
  • SEARCH
  • 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 3997296
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:23:04+00:00 2026-05-20T07:23:04+00:00

Hi I want to create aplication which loads large image, and simple gesture I

  • 0

Hi I want to create aplication which loads large image, and simple gesture I can move across it. I have to image printed out but I can not implement onTouch so it remains stationary. Any help apreseated. Thanks

My code for drawing out the picture:

@Override protected void onDraw(Canvas canvas) {
          super.onDraw(canvas);
                   Paint paint = new Paint();
            paint.setStyle(Paint.Style.FILL);

            // make the entire canvas white
            paint.setColor(Color.WHITE);
            canvas.drawPaint(paint);
paint.setStrokeWidth(1);
            paint.setPathEffect(null);
            paint.setColor(Color.GRAY);
            paint.setAntiAlias(true);


            for (int i=1; i < 100; i++){
                canvas.drawLine(0, i*1 , 600, i*20, paint);
                canvas.drawLine(i*1 ,0, i*20, 600, paint);      
            }
}
  • 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-20T07:23:05+00:00Added an answer on May 20, 2026 at 7:23 am

    Within your view, you need to create the “OnTouchListener” which should look something like this:

    myView.setOnTouchListener(new View.OnTouchListnener(){
        @Override
        public boolean onTouch(View v, MotionEvent e){
            switch(e.getAction()){
            case MotionEvent.ACTION_DOWN:
            //and code will go here for putting the finger on the screen
    

    I would have a look at MotionEvent and looking at the various levels. You’ll want to pay attention to how it can pack several bits of movement information into one MotionEvent.

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

Sidebar

Related Questions

I want to create an application which will have a client and server components.
I want to know if i can create a custom google maps application,on which
I want to globalize my application. I have created a small form which asks
I have created an application (a web-based application) which now has a large number
I have a large application spread across multiple Spring bean definition xml files. In
I have created a simple SWF-loader in ActionScript 3.0. It loads an SWF from
If all tables I want to delete from have the column gamer_id can i
I want to create a Java application bundle for Mac without using Mac. According
I want to create my Rails application with MySQL, because I like it so
I want to create a c# application with multiple windows that are all transparent

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.