Canvas INSIDE of a Layout???

by Ryan Detwiler » Tue, 09 Nov 2010 02:23:42 GMT

Sponsored Links
 Hellooo.. I need to have a dynamically updateable canvas inside of a
layout. I would prefer having some sort of method to draw to an
imageview, which is displayed in red on the screenshot. It's intended
to be a graph that updates every 5 times/second or so. Any ideas??
I've been searching for hours and can't seem to find some sort of
concrete example. they all make the entire screen a canvas, which
doesn't allow for layouts. Please help, and thanks in advance! :) 


Canvas INSIDE of a Layout???

by Stephen Jungels » Tue, 09 Nov 2010 03:01:38 GMT

 This would be an example of creating a custom component.  It's covered
very well in the docs: 

The requirement for timed updates can be filled by your activity
calling invalidate() on the custom view when needed.



Sponsored Links

Other Threads

1. Problem playing video

hi all
I'm getting crash signatures when trying to play a .3gp or .mp4 file.

here is that

INFO/DEBUG(494): pid: 606, tid: 644  >>> <<<
INFO/DEBUG(494): signal 11 (SIGSEGV), fault addr 00000050
INFO/DEBUG(494):  r0 0011d2c0  r1 00000000  r2 00004b64  r3 42c8de88
INFO/DEBUG(494):  r4 00000000  r5 001603b8  r6 00161e60  r7 00000224
INFO/DEBUG(494):  r8 00004b64  r9 42c8de88  10 00002340  fp 00003124
INFO/DEBUG(494):  ip 00000001  sp 42c8de28  lr afe0e448  pc a7393e98
cpsr 00000010
INFO/DEBUG(494):          #01  pc a7393e98  /system/lib/
INFO/DEBUG(494):          #01  lr afe0e448  /system/lib/
INFO/DEBUG(494): stack:
INFO/DEBUG(494):     42c8de00  a747f650  /system/lib/
INFO/DEBUG(494):     42c8de04  00161e60  [heap]

can any one help me to sort out this problem
my code is similar to the code published

thanx in advance


2. Write PNG to PIcture Directory (FileOutputStream)

Hello all,
How can I write an image so that it shows up under 'Pictures'?

I've got a FileOutputStream like this:
--Mypic is a valid bitmap.

try {

                 FileOutputStream stream = super.openFileOutput("picture.png",

             Mypic.compress(CompressFormat.PNG, 100, stream);
     }catch(Exception e) {Log.e("MyLog", e.toString());  }

Any help is appreciated.

Josh Beck

3. :: wat is the limit for the size of the .apk file

4. Not able to enter full phone functionality when no SIM - why?

5. Hi... Issue while accessing the content provider

6. .getSelectedItemId() always selecting 0 when using the touch screen

7. Deleting old email's