2

我有一个问题:
使用这个 xml 布局:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical">
    <EditText android:id="@+id/nomenota"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"/>
    <EditText android:id="@+id/corponota"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:inputType="textMultiLine"/>
    <TableLayout   
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
        <TableRow >
        <Button android:id="@+id/visualizza_notaOK"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/notaOK"/>
        <Button android:id="@+id/nota_annulla"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/nuovanotaannulla"/>
    </TableRow>
</TableLayout>  

我的活动显示如下:
在此处输入图像描述

如您所见,我的消息正文以一个大的编辑文本为中心,我不想要这个结果。
我想要的结果就像这个链接:我想要实现的布局链接

有人可以帮助我吗?
提前致谢。
马可。

4

1 回答 1

5

在edittext中应用此属性android:gravity="top"

于 2012-04-17T08:59:12.167 回答