Android 糟糕的吐司轮换

Android 糟糕的吐司轮换,android,user-interface,rotation,toast,Android,User Interface,Rotation,Toast,我想使用下一个代码旋转toast: Toast toast = Toast.makeText(getApplicationContext(), "This is toast!", Toast.LENGTH_LONG); View toastView = toast.getView(); toastView.setRotation(90); toast.show(); 但在屏幕底部看起来是这样的: 我怎样才能使烤面包看起来好看呢 如果我将自定义值设置为toastView的setWidth()和

我想使用下一个代码旋转toast:

Toast toast = Toast.makeText(getApplicationContext(), "This is toast!", Toast.LENGTH_LONG);
View toastView = toast.getView();
toastView.setRotation(90);
toast.show();
但在屏幕底部看起来是这样的:

我怎样才能使烤面包看起来好看呢

如果我将自定义值设置为
toastView
setWidth()
setHeight()
,所有这些看起来都不错,但我正在寻找更优雅、更普通的方法

请记住,我不想重画toastView的画布(StackOverflow上已经有这样的帖子了),我只想旋转普通的toastView,只需添加:

toastView.setElevation(100);

只需添加:

toastView.setElevation(100);