Frx*_*rem 10
正如hackbod 所说,你必须有一个自定义视图来显示吐司.
我找到了一些为你旋转标签的课程:VerticalLabelView和CustomTextView
我选择使用后者,并在我自己的应用程序中使用此代码:
// Creating a new toast object
Toast myToast = new Toast(MyActivity.this);
// Creating our custom text view, and setting text/rotation
CustomTextView text = new CustomTextView(MyActivity.this);
text.SetText("Hello World!");
text.SetRotation(-90, 120, 90);
myToast.setView(text);
// Setting duration and displaying the toast
myToast.setDuration(Toast.LENGTH_SHORT);
myToast.show();
Run Code Online (Sandbox Code Playgroud)