title: How to draw many bitmap on cavas
body: <p>I want to draw many bitmaps on canvas but the android show: &quot;The application may be doing too much work on its main thread&quot; and the app doesn't run. [ cloud_number is over 50 ]</p>
  <p>Here my code:</p>
  <pre><code> fun draw_beautiful(canvas: Canvas){
  
      val mPaint: Paint = Paint()
      mPaint.style = Paint.Style.FILL
      mPaint.isAntiAlias = true
      mPaint.color= Color.BLACK
  
      var vt = 0; var x1 =0f; var y1 =0f;var style =0;
  
      for (i in 1..cloud_number){
          vt = i*4-3
          style = mt_cloud[vt]
          x1  = mt_cloud[vt+2].toFloat()
          y1 = mt_cloud[vt+3].toFloat()
  
          
          var ob= canvas_cloud1
          if (style==0) ob= canvas_cloud1
          else if (style==1) ob= canvas_cloud2
          else if (style==2) ob= canvas_cloud3
  
          canvas.drawBitmap(ob, x1,y1 , mPaint)
  
      }
  
  }
  </code></pre>