Skip to content Skip to sidebar Skip to footer

Drawing A Line With Canvas From An Activity

I have read the following links: How to draw a line in android http://marakana.com/s/android_2d_graphics_example,1036/index.html http://developer.android.com/reference/android/grap

Solution 1:

You can extend a view and override the onDraw and manage all your lines there.

Then, you can add this view (that can be full screen) in another xml (that can be used in an Activity) like this:

<my.package.myView
    android:layout_width=@"fill_parent"
    android:layout_height=@"fill_parent"/>

Be sure that the layout you use in your main activity is a RelativeLayout so you can fill the entire screen AND be on the top of your views. To place your view on top of your views be sure that you have your view in the end of your activity xml.

Post a Comment for "Drawing A Line With Canvas From An Activity"