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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:49:18+00:00 2026-05-30T04:49:18+00:00

I have a Android program which you type in equation and them program display

  • 0

I have a Android program which you type in equation and them program display you in “new” layout a graph, its like coordinate system.You have function line, x line, y line… like school basic, you know, easy one.
But if your equation numbers are to hight like: “x*x*40″ your graph line is to big to be on display. So here i need yur help.
In android you can move picture up, down, left, right, zoom,… and i what to do same with a graph.I found a tutorails like this one:http://obviam.net/index.php/displaying-graphics-with-android/
,but this contains picture and i dont have picture!I have no picture or what so ever. Program works in Canvas and draw lines with command like this:”g.drawLine(x1, y1, x2, y2, color);” and the and it looks somethink like this in full screen:

http://grockit.com/blog/collegeprep/files/2009/12/14.JPG

So here is problem how to move like picture but its not a picture. In a lot of examples you must have a picture like R.drawable.image, but here are just calculated lines.
I have one idea how to do it, but its probably stupid:
-if you made a graph bigger than your screen (much bigger) and than do a screenshot, save like picture and than move like picture as in example

(if you need more explanation i can do it) sry if my English was bad 🙁

Thank you

  • 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-30T04:49:20+00:00Added an answer on May 30, 2026 at 4:49 am

    Well, your best bet here is to use OpenGL. Otherwise, not only will you have problems with lines sometimes being to big or to small for a given screen, but also with different screen resolutions (your line might be too big for a 320×480 screen, but it will very well become too small for some of the new 1280×720 screens).

    Here’s what I would do:

    • make an opengl surface view with ORTHOGONAL projection
    • make orthogonal projection’s “far side” be of high resolution, with fixed width, like maybe 1600
    • when surface is initialized, the opengl viewport is initted to screen’s width and height
      also the surface’s far side’s height will be set to keep the proportions with those of the screen.

    • you can then use Canvas and its drawxxx() methods to create a bitmap with your graph and text and whatever else you want to display.

    • then you use that bitmap to make a texture for a rectangular poligon that you draw in your orthogonal perspective.

    • now the size of the graph will always scale properlly with the user’s screen size (like fit in all the time)

    • also now you can easily add zoom and scroll options

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

Sidebar

Related Questions

I have a program which generates its own Wireshark pcap-file (sort of a network
i have a simple program on android which is drawing on user touch. here's
I have an android program which draws lines and text to a canvas. (These
I have an Android program which has a RemoteService (different process) and the Application
My program is targeting Android 1.5. I would like to retrieve system information about
I have an android program. It has a button which when clicked is supposed
I have Android pet-project DroidIn which utilizes HttpClient 4 (built into Android) to do
I have an Android App which consists on different modules. The Main module is
I have an android activity in which I'm using tabs. public class UnitActivity extends
I have to program my Android app with the best compatibility to different screen

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.