Android 如何适应按钮上的文本?

Android 如何适应按钮上的文本?,android,button,text,Android,Button,Text,在我的android应用程序中,我有一个用于投票照片的按钮。当用户选择此按钮时,此按钮上的文本变为“感谢您的投票”,当用户看到他之前投票的照片时,此按钮上的文本将显示“您已经投票支持此照片”…问题是,它看起来像这样: 有人能帮我热一下吗?我能按一下按钮上的文字吗 任何想法都欢迎。提前谢谢 在xml中,我有以下内容: <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_con

在我的android应用程序中,我有一个用于投票照片的按钮。当用户选择此按钮时,此按钮上的文本变为“感谢您的投票”,当用户看到他之前投票的照片时,此按钮上的文本将显示“您已经投票支持此照片”…问题是,它看起来像这样:

有人能帮我热一下吗?我能按一下按钮上的文字吗

任何想法都欢迎。提前谢谢

在xml中,我有以下内容:

<LinearLayout android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:layout_below="@id/imagetitle"
        android:orientation="horizontal">
        <Button android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Previous" android:id="@+id/previous" />
        <Button android:layout_width="185dip" android:layout_height="wrap_content"
            android:text="Vote for this picture" android:id="@+id/vote" />
        <Button android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:text="Next" android:id="@+id/next" />
    </LinearLayout>

使用
按钮的
布局高度
属性的
包装内容
您好,看看这些,如果每个屏幕有不同的样式,可能会解决您的问题:D

我想您应该将所有按钮的顶部对齐 在布局中添加此行

LinearLayout android:baselineAligned="false"

你想做什么?让它占据更多的空间?或者剪切文本?我希望投票按钮与按钮“下一个”和“上一个”处于同一级别,在同一行上…并且要查看按钮上的所有文本,请直接使用android:width和android:layout\u width=“wrap\u content”我有布局高度的wrap\u内容如果我有:我得到这个:那么,它更好,但不是ok@Gabrielle为它们分配布局权重可能有助于