Android 应用程序中的文本格式。?
非常简单的问题。 或者我是个白痴。 基本上,我制作了一个.xml格式的应用程序,如下所示(在列表中): 相反,在应用程序中,它是这样出现的 姓名地址电话县等 只是我还是这么简单?我在谷歌上搜索了一下,但我找不到任何与我的情况相关的东西Android 应用程序中的文本格式。?,android,text,formatting,edit,Android,Text,Formatting,Edit,非常简单的问题。 或者我是个白痴。 基本上,我制作了一个.xml格式的应用程序,如下所示(在列表中): 相反,在应用程序中,它是这样出现的 姓名地址电话县等 只是我还是这么简单?我在谷歌上搜索了一下,但我找不到任何与我的情况相关的东西 如果我做错了,我应该用什么 每次我有新行时是否需要创建另一个文本视图 非常感谢 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tool
- 如果我做错了,我应该用什么
- 每次我有新行时是否需要创建另一个文本视图
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Main" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text=""
android:textAppearance="?android:attr/textAppearanceSmall" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" >
</LinearLayout>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:orientation="vertical"
android:text="Name *
Phone *
Email *
Type of Event
Date of Event (if known)
What would you like to know more about?
Message:
"
android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>
将文本视图更改为:
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:orientation="vertical"
android:text="Name *\n
Phone *\n
Email *\n
Type of Event\n
Date of Event (if known)\n
What would you like to know more about?\n
Message:"
android:textAppearance="?android:attr/textAppearanceSmall" />
\n
是换行符。如果您想换行,请使用它。您可以发布您的xml吗?Orentation似乎没有任何作用
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:orientation="vertical"
android:text="Name *\n
Phone *\n
Email *\n
Type of Event\n
Date of Event (if known)\n
What would you like to know more about?\n
Message:"
android:textAppearance="?android:attr/textAppearanceSmall" />