2013-06-05 4 views
0

очень простой вопрос. Или я идиот. в основном я сделал приложение с текстом в .xml, как это (в списке):форматирование текста в приложении.?

-name 
-email 
-phone 
-venue 
-date 
-etc 

вместо этого в приложении он выходит как этот

имени адрес телефон округ и т.д.

это только у меня или это просто ив смотрел и поиск Google, но я не могу найти что-либо отношение к моей ситуации

  • что я должен использовать, если im делает это неправильно
    • Мне нужно создать другое текстовое представление eveytime, у меня есть новая линия?

благодаря таким muchhhh

<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> 
+0

Можете ли вы разместить свой xml, пожалуйста? –

+0

извините, что это –

ответ

0

Изменить TextView к этому:

<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 является newline характер. Используйте его, если хотите разрывы строк.

+0

orentiation ничего не делает –

+0

@xiHarpzZ Я обновил свой ответ –

+0

о, боже, спасибо вам большое! –

Смежные вопросы