I need a progress bar displaying progress from right to left or from left to right depending on variable. I have also text in the middle of the bar. For all that, I am using a custom class. For rotating the bar, I followed this thread but somehow either the text is not displayed, or it is rotated, or everything disappears from the view...
Code without rotation:
protected synchronized void onDraw(Canvas canvas) {
super.onDraw(canvas);
// draw text
}
I have a property positive
telling whether to start from left or from right. It would be easy, if I didn't had the text, I would simply call setRotation()
somewhere in the code, but now I am trying to rotate the canvas and I can't manage it to bring everything in the correct order. Can someone help me?