Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
(Android は初めてです)
キャンバスに描画されたビットマップがあり、アクティビティが開始されるたびにランダムに表示する方法を知りたいのですが、これを使用してこれを行うことができるかどうかを知りたいcanvas.drawBitmapですか?
canvas.drawBitmap
私はSurfaceViewを使用していますが、現在メソッドcanvas.drawBitmapの下にあり public void render(Canvas canvas)ます。どんな助けでも大歓迎です!ありがとう!
public void render(Canvas canvas)
Random random = new Random(); canvas.drawBitmap(bitmap,random.nextInt(canvas.getWidth()-bitmap.getWidth()),random.nextInt(canvas.getHeight()-bitmap.getHeight()),null);