He made a game on the guide from Kilobolt and made a game on java first. When I tried to transfer to the guide on the android, I noticed that there are no many methods from java.awt. * To android. Is there an alternative to java.awt.Graphics?

Here is how an example method in java

public void paintItBlack(Graphics g) { if (currentRoom>=0) { g.setColor(Color.BLACK); g.fillRect(0, 0, 1024, 640); } } 
  • @ dante4001, If ​​you are given a comprehensive answer, mark it as correct (click on the check mark next to the selected answer). - Vitalina

1 answer 1

Android has its own library for working with graphics. They are in the android.graphics package. Here is a link from the official site of Android Graphics

Try to see the methods and classes of this package. There is also a ported library, but unfortunately, it is already outdated and not supported.

COMPAT AWT Library

  • > COMPAT AWT Library judging by what is written there, I would not use it - iksuy
  • one
    > but unfortunately, already outdated and not supported. I warned) - CROSP