title: add image to surface view in android
body: <p>I want to add image to Surface view. So i used below code</p>
  
  <pre><code>public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback{
  
       Bitmap myicon;
       Canvas canvas;
       private Paint   mBitmapPaint;
  
       Paint p= new Paint();
  
  
         @Override
          protected void onDraw(Canvas canvas) {
             Bitmap myicon=BitmapFactory.decodeResource(getResources(),R.drawable.icon);
             canvas.drawColor(Color.BLACK);
             canvas.drawBitmap(myicon, 0,0, p);
             // canvas.drawBitmap(myicon, 0,0, null);
             // canvas.drawBitmap(myicon, 25,25, null);
         }
          public MySurfaceView(Context context) {
              super(context);
              // TODO Auto-generated constructor stub
          }
  
          public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
              // TODO Auto-generated method stub
  
          }
  
          public void surfaceCreated(SurfaceHolder holder) {
              // TODO Auto-generated method stub
  
          }
  
          public void surfaceDestroyed(SurfaceHolder arg0) {
              // TODO Auto-generated method stub
  
          }
      }
  </code></pre>
  
  <p>But it shows black screen. I didn't get what i did wrong in above code.</p>
  
  <p>Please solve the problem</p>
  
  <p>Thanks in advance.</p>