【问题标题】:EditText with multilines android API level 8具有多行 android API 级别 8 的 EditText
【发布时间】:2012-04-28 14:09:58
【问题描述】:

我有一个问题:
使用这个 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>  

我的活动显示如下:

如您所见,我的消息正文以一个大的编辑文本为中心,我不想要这个结果。
我想要的结果是这样的链接:link of layout that i want to achieve

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

【问题讨论】:

  • 伟大的奇拉格!!!谢谢大家,因为我已经解决了!真的谢谢...
  • 如果你喜欢回答我接受你的回答 Chirag!!!
  • 如果我的问题很好并且不清楚或没有冒犯性,请评价我的问题...

标签: android android-layout android-edittext


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多