2015-01-07 106 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" 
相关问题