2015-01-07 67 views
6
<TextView 
    android:id="@+id/textView1" 
    android:layout_width="match_parent" 
    android:layout_height="10" 
    android:layout_alignBottom="@+id/editText2" 
    android:layout_alignRight="@+id/editText2" 
    android:layout_alignEnd="@+id/editText2" 
    android:layout_marginBottom="63dp" 
    android:text="@string/hello" /> 

每次我輸入文本時沒有字符串,它給了我一個黃色的符號。所以我做了一個字符串。現在我在layout_height處得到上面的消息。我是android開發新手。錯誤:錯誤:整數類型不允許(在'layout_height'值'10')

回答

10

使用或者DP或SP與整數指定值

android:layout_height="10dp" 

android:layout_height="35sp" 
相關問題