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