1. Are you ready for the Galaxy S20? Here is everything we know so far!

Drawing

Discussion in 'Android Development' started by Raffe, Dec 3, 2009.

  1. Raffe

    Raffe Lurker
    Thread Starter

    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
     



    1. Download the Forums for Android™ app!


      Download

       
  2. JoshKraker

    JoshKraker Newbie

    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 Lurker
    Thread Starter

    Thanks,

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

    scorpicon Newbie

    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...
Similar Threads - Drawing
  1. App Update
    Replies:
    0
    Views:
    176
  2. Pedrum Golriz
    Replies:
    1
    Views:
    249
  3. Samsung
    Replies:
    0
    Views:
    170
  4. App Update
    Replies:
    0
    Views:
    140
  5. dPRogerWilco
    Replies:
    1
    Views:
    162
  6. Bretwa
    Replies:
    0
    Views:
    566
  7. iTP
    Replies:
    0
    Views:
    280
  8. Rad Brothers
    Replies:
    1
    Views:
    804
  9. App Update
    Replies:
    0
    Views:
    182
  10. App Update
    Replies:
    0
    Views:
    153

Share This Page

Loading...