Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Textview未在Android布局中正确包装_Android_Xml_User Interface_Textview_Word Wrap - Fatal编程技术网

Textview未在Android布局中正确包装

Textview未在Android布局中正确包装,android,xml,user-interface,textview,word-wrap,Android,Xml,User Interface,Textview,Word Wrap,我在创建页面时遇到问题 当我添加多行时,UI看起来不太好 这是我的XML ` ` 请建议如何处理文本视图。尝试以下方法: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout

我在创建页面时遇到问题

当我添加多行时,UI看起来不太好

这是我的XML

`


`

请建议如何处理文本视图。

尝试以下方法:

<LinearLayout 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:orientation="vertical"
    tools:context=".MainActivity" >

<RelativeLayout
    android:id="@+id/Top_layout"
    android:layout_width="match_parent"
    android:layout_height="80dp"
 >

    <ImageView
        android:id="@+id/app_name"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:background="@drawable/ic_launcher" />
</RelativeLayout>

<RelativeLayout
    android:id="@+id/layout_sub_middle"
    android:layout_width="match_parent"
    android:layout_height="30dp"
    android:background="#D4D5D5" >

    <TextView
        android:id="@+id/titel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="4dp"
        android:text="Aller Biler"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:background="#000"
        android:gravity="bottom"
        android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>

<RelativeLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_marginBottom="1dp"
    android:layout_marginTop="1dp" >

    <ImageView
        android:id="@+id/image_display_detail"
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_gravity="center_horizontal"
        android:background="@drawable/ic_launcher" />
</RelativeLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
 android:weightSum="3"
>
    <LinearLayout 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        >
          <TextView
        android:id="@+id/name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:text="Navn:" />
    </LinearLayout>

   <LinearLayout 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        >

    <TextView
        android:id="@+id/display_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"       
        android:ellipsize="none"
        android:maxLines="2"
        android:scrollHorizontally="false"
        android:singleLine="false"
        android:text="manish" />
    </LinearLayout>
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="50dp"
    android:weightSum="3"
  >
    <LinearLayout 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        >
    <TextView
        android:id="@+id/name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:text="Navn:" />
    </LinearLayout>
     <LinearLayout 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="2"
        >

    <TextView
        android:id="@+id/display_name"
        android:layout_width="wrap_content"
        android:gravity="left"
        android:layout_height="wrap_content"

        android:text="What we are looking forBachelor degree or equivalentKeen interest in online marketing &amp; online business models3-4 years of experience in handling web analytics tools such as Google Analytics, Omniture or Web trendsUnderstanding of HTML and web protocolsBeginner-to-Intermediate JavaScript skillsComf" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

<LinearLayout 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:orientation="vertical"
    tools:context=".MainActivity" >

<RelativeLayout
    android:id="@+id/Top_layout"
    android:layout_width="match_parent"
    android:layout_height="80dp"
 >

    <ImageView
        android:id="@+id/app_name"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:background="@drawable/ic_launcher" />
</RelativeLayout>

<RelativeLayout
    android:id="@+id/layout_sub_middle"
    android:layout_width="match_parent"
    android:layout_height="30dp"
    android:background="#D4D5D5" >

    <TextView
        android:id="@+id/titel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="4dp"
        android:text="Aller Biler"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:background="#000"
        android:gravity="bottom"
        android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>

<RelativeLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_marginBottom="1dp"
    android:layout_marginTop="1dp" >

    <ImageView
        android:id="@+id/image_display_detail"
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_gravity="center_horizontal"
        android:background="@drawable/ic_launcher" />
</RelativeLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
 android:weightSum="3"
>
    <LinearLayout 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        >
          <TextView
        android:id="@+id/name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:text="Navn:" />
    </LinearLayout>

   <LinearLayout 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        >

    <TextView
        android:id="@+id/display_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"       
        android:ellipsize="none"
        android:maxLines="2"
        android:scrollHorizontally="false"
        android:singleLine="false"
        android:text="manish" />
    </LinearLayout>
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="50dp"
    android:weightSum="3"
  >
    <LinearLayout 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        >
    <TextView
        android:id="@+id/name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:text="Navn:" />
    </LinearLayout>
     <LinearLayout 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="2"
        >

    <TextView
        android:id="@+id/display_name"
        android:layout_width="wrap_content"
        android:gravity="left"
        android:layout_height="wrap_content"

        android:text="What we are looking forBachelor degree or equivalentKeen interest in online marketing &amp; online business models3-4 years of experience in handling web analytics tools such as Google Analytics, Omniture or Web trendsUnderstanding of HTML and web protocolsBeginner-to-Intermediate JavaScript skillsComf" />
</LinearLayout>
</LinearLayout>
</LinearLayout>