There is a class GamePanel, in which the whole game process takes place. The game is associated with the management of the spacecraft, which has ODA. margin of safety, and I would like to visualize the strength and its reduction through progressBar
RelativeLayout layout = new RelativeLayout(context); progressBar = new ProgressBar(context); progressBar.setProgress(100); layout.addView(progressBar);