2015-11-22 4 views
0

Я пытаюсь сделать линейный макет с одним EditText, двумя TextView и GridView в качестве его дочерних элементов.Ошибка размещения макета Android: отображается неучтенная строка

Ниже мой код:

<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"> 

<EditText android:id="@+id/input" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:gravity="right" 
    android:textSize="30sp" 
    android:layout_marginTop="20dp" 
    android:layout_marginLeft="5dp"/> 


<TextView android:id="@+id/output" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:gravity="right" 
    android:textSize="25sp" 
    android:layout_marginTop="20dp" 
    android:layout_marginLeft="5dp"/> 

<TextView android:id="@+id/output_words" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:gravity="right" 
    android:textSize="25sp" 
    android:layout_marginTop="20dp" 
    android:layout_marginLeft="5dp"/> 


<GridView 
    android:id="@+id/gridview" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:horizontalSpacing="5dp" 
    android:verticalSpacing="5dp" 
    android:numColumns="5" 
    android:stretchMode="columnWidth" 
    android:gravity="center" 
    android:columnWidth="50dp" 
    android:layout_marginTop="20dp"/> 

Но когда я запустить приложение в реальном устройстве, я также могу видеть line.I не понимают, что является причиной линии появляться ,

enter image description here

Любой вход будет иметь большую помощь.

ответ

0

Это строка EditText, которую вы определили в своем xml.

+0

Вы хотите сказать, что EditText имеет встроенную строку ... TextView не имеет такой строки. – Mandroid

+0

Да. Попробуйте удалить EditText, и строка должна исчезнуть. –

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