Drawing


  1. Raffe

    Raffe New Member

    Hi,

    I'm brand new to this android coding. Started like 3 days ago. Have been coding C# for like 2 years but no Java.

    And I'm REALLY frustrated at the moment.

    I'm currently working on this app where I got a button and a textview on top. A progressbar at the bottom on a regular AbsoluteLayout thingie.
    What this app does is it gets the max amplitude from my mic every 100 milliseconds for 1 minute and saves the values into an int vector.

    What I want to do is have a designated are about 250x250 pixels located between my button and my progress bar where I can draw stuff... Like a line or a circle or whatever... Doesn't really matter what, I just want to be able to draw someting in the middle of the screen without the other stuff dissapearing.

    I've tried working with canvases but everytime I draw something the canvas takes up all of my screen thus hiding my controls.
    I've been looking for something to tell me how to do this for about 5 hours not but I can't find anything helpful

    How do I do this?

    /Raffe

    Advertisement
    :
  2. JoshKraker

    JoshKraker Member

    I recently been doing some drawings on top of a MapView by way of onDraw and the canvas and havn't had a problem. Could you maybe post some of your code where you were drawing to the canvas and I'll see if I can see anything wrong with it.
  3. Raffe

    Raffe New Member

    Thanks,

    I got it to work tho... Like 30mins before I got off work. :D
  4. scorpicon

    scorpicon Member

    I've found that extending the View class and then setting your new view to have a specific size in your layout XML works to confine drawing to a limited portion of the screen.

    Could you post your solution? It might help others searching for the same thing. :)
Loading...

Share This Page