I have the following code, which aligns a “score” panel bitmap (to the very center of the view) before drawing it to the canvas:
score.setLeft((view.getWidth() - score.getWidth()) / 2);
score.setTop(view.getHeight() / 3);
score.draw(c, layer);
As I had mentioned, this code aligns it to the center (horizontally and vertically). So, how might I get it to align to the center horizontally, but along the top of the view?
I think this should do the trick
score.setTop(0);
(replace your setTop call with this one)