AndroidStudioで以下のようなレイアウトを作成しましたが、以下のような不具合が発生しています。解決方法を教えていただけると助かります。
なお、質問のレベルも踏まえたうえで初心者にもわかりやすい回答をお願いできればと思います。
- 空白の部分が緑色になる
- 下から2番目の</LinearLayout>がエラーになる
xml
1<?xml version="1.0" encoding="utf-8"?> 2<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:app="http://schemas.android.com/apk/res-auto" 4 xmlns:tools="http://schemas.android.com/tools" 5 android:layout_width="match_parent" 6 android:layout_height="match_parent" 7 android:orientation="vertical" 8 tools:context=".MainActivity"> 9 10 <TextView 11 android:layout_width="wrap_content" 12 android:layout_height="wrap_content" 13 android:text="text" 14 android:textSize="30dp"/> 15 16 <LinearLayout 17 android:layout_width="match_parent" 18 android:layout_height="wrap_content"> 19 20 <Button 21 android:layout_width="wrap_content" 22 android:layout_height="wrap_content" 23 android:text="-"/> 24 25 <Button 26 android:layout_width="wrap_content" 27 android:layout_height="wrap_content" 28 android:text="button"/> 29 30 <Button 31 android:layout_width="wrap_content" 32 android:layout_height="wrap_content" 33 android:text="+"/> 34 35 </LinearLayout> 36 37</LinearLayout>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。