2017-09-19 2 views
-3
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="warp_content" 
android:background="@drawable/background"> 

データ型が正しくないと思われますか?私はエラー:(1)文字列の型が許可されていません( 'layout_height'の値が 'warp_content'の場合)

android:layout_height="match_parent" 

android:layout_height="warp_content" 

を変更する場合は動作します。しかし、私はwarp_content、任意の提案を使用したいですか?

答えて

1

変更 android:layout_height="warp_content"

android:layout_height="wrap_content"

1

にあなたがwrap_contentないwarp_contentを使用する必要があります!

android:layout_height="wrap_content" 
+0

はい...私はそれを実感しました。 – admiralxs

関連する問題