android - 更改按钮上文本的方向

标签 android orientation

我将如何更改按钮中文本的方向,使它们垂直而不是水平书写?

<Button
    android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_weight="0.10"
    android:text="Previous" />

这可能吗?

最佳答案

这是设置宽度为12dp后的截图

enter image description here

试试这个

\n 字符放入您的字符串中作为 Strings.xml 中的换行符 像这样

1\n 2\n 3\n

也可以直接这样设置

android:text="@String/yourstring"

关于android - 更改按钮上文本的方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15246373/

相关文章:

java - android发送 Intent 额外

android - 访问连接被拒绝 new linkedin Android SDK

Android - 更改模拟器屏幕方向

ios - iOS 应用程序设置中的 "Supported Device Orientation"有什么意义?

android - 当我从“运行”菜单中选择“停止”时,为什么模拟器窗口不会在 Android Studio 1.1.0 中关闭?

android - 旋转时导航组件崩溃

java - Adapter.getView 从未被称为 Android Studio

Android 在运行时确定屏幕方向

javascript - 绕 z 轴旋转时 iOS 陀螺仪错误

c# - 如何确定三角形的方向/旋转?