Android StudioでAndroid開発をしていたのですが、レイアウトの画面で「match_parent」と入力すると強制的に「0dp」などに変換されてしまい、使用することが出来ません。
最新バージョンを使用しております。
何かしら設定があるのでしょうか。
詳しい方がおられましたらご教授願えればと思います。
以下追記になります。
ご指摘のあった通りレイアウトファイルを載せます。
載せ忘れていて申し訳ありませんでした。
XML
1<?xml version="1.0" encoding="utf-8"?> 2<android.support.constraint.ConstraintLayout 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 tools:context="com.alpcsr.voicenotepad.MainActivity"> 8 9 <LinearLayout 10 android:layout_width="344dp" 11 android:layout_height="495dp" 12 app:layout_constraintLeft_toLeftOf="parent" 13 app:layout_constraintRight_toRightOf="parent" 14 app:layout_constraintTop_toTopOf="parent" 15 app:layout_constraintBottom_toBottomOf="parent"> 16 17 18 <EditText 19 android:id="@+id/editText" 20 android:layout_width="match_parent" 21 android:layout_height="405dp" 22 android:inputType="textMultiLine" 23 tools:layout_editor_absoluteX="16dp" 24 tools:layout_editor_absoluteY="16dp" 25 android:gravity="top"/> 26 27 </LinearLayout> 28 29 <Button 30 android:id="@+id/buttonRecord" 31 android:layout_width="350dp" 32 android:layout_height="62dp" 33 android:text="@string/RecordButtonTextStart" 34 android:layout_marginBottom="26dp" 35 app:layout_constraintLeft_toLeftOf="parent" 36 app:layout_constraintBottom_toBottomOf="parent" 37 app:layout_constraintRight_toRightOf="parent" 38 android:onClick="OnBnRecord"/> 39 40 41</android.support.constraint.ConstraintLayout>
「LinearLayout」や「EditText」の「android:layout_width」を「match_parent」にしたいのですが、もしかすると出来ないのでしょうか。
その場合横幅いっぱいに表示するにはどのようにすればよいかなど教えて頂きたく思います。
回答1件
あなたの回答
tips
プレビュー