Radar animation android

前端 未结 3 945
囚心锁ツ
囚心锁ツ 2021-01-01 06:32

So here is the thing. I am monitoring certain distances, and i would like to display them in a radar animation. The base radar image would be something like this (not exactl

3条回答
  •  悲&欢浪女
    2021-01-01 06:54

    "I am monitoring certain distances" ~ What does that mean?

    To make a radar create a class that extends ImageView. Override onDraw(Canvas canvas) and set the image resource to a radar background.

     @Override
     public void onDraw(Canvas canvas) {
         //draw background
         super.onDraw(canvas);
    
         for(PointF p : points)
         {
             //draw each point as an image.  Maybe, translate by width/2 and height/2
         }
     }
    

提交回复
热议问题