I have an Activity in Landscape-Mode. Inside there is a Custom-Title-View aligned like this:
Is it possible to keep the landscape mode and 'fake' this one View into portrait-mode like this:
I have tried to overwrite my custom TitleView and put something like this to draw(Canvas)
public class VerticalTitle extends Title{
public draw(Canvas){
canvas.save();
canvas.rotate(getWidth() / 2, getHeight() / 2);
// i tryed many translations, but get none to work
canvas.translate(0, getHeight());
super.draw(canvas);
canvas.restore()
}
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
super.onMeasure(heightMeasureSpec, widthMeasureSpec);
setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
}
}
If it is on any interest, The TitleBar extends from RelativeLayout and has fixed height and fill_parent width
The setRotate parameter from View is not an option, because the app should stay compatible to 2.2.