質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
Java

Javaは、1995年にサン・マイクロシステムズが開発したプログラミング言語です。表記法はC言語に似ていますが、既存のプログラミング言語の短所を踏まえていちから設計されており、最初からオブジェクト指向性を備えてデザインされています。セキュリティ面が強力であることや、ネットワーク環境での利用に向いていることが特徴です。Javaで作られたソフトウェアは基本的にいかなるプラットフォームでも作動します。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Q&A

解決済

1回答

1383閲覧

match_parentを指定しているのに画面いっぱいにならない

oika77

総合スコア184

Java

Javaは、1995年にサン・マイクロシステムズが開発したプログラミング言語です。表記法はC言語に似ていますが、既存のプログラミング言語の短所を踏まえていちから設計されており、最初からオブジェクト指向性を備えてデザインされています。セキュリティ面が強力であることや、ネットワーク環境での利用に向いていることが特徴です。Javaで作られたソフトウェアは基本的にいかなるプラットフォームでも作動します。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

0グッド

0クリップ

投稿2020/06/05 01:46

編集2020/06/05 01:55

java

1コード 2 <LinearLayout 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" 5 android:orientation="horizontal"> 6 7 8 <LinearLayout 9 android:layout_width="wrap_content" 10 android:layout_height="match_parent" 11 android:orientation="vertical"> 12 13 <ImageView 14 android:id="@+id/imageView" 15 android:layout_width="80dp" 16 android:layout_height="wrap_content" 17 android:layout_weight="1" 18 android:contentDescription="TODO" 19 app:srcCompat="@drawable/camera01" 20 tools:ignore="VectorDrawableCompat" /> 21 22 <TextView 23 android:id="@+id/textView6" 24 android:layout_width="match_parent" 25 android:layout_height="wrap_content" 26 android:text="@string/footer_bar_camera" /> 27 </LinearLayout> 28 29 <LinearLayout 30 android:layout_width="wrap_content" 31 android:layout_height="wrap_content" 32 android:orientation="vertical"> 33 34 <ImageView 35 android:id="@+id/imageView2" 36 android:layout_width="80dp" 37 android:layout_height="wrap_content" 38 android:layout_weight="1" 39 app:srcCompat="@drawable/plus_icon" 40 tools:ignore="VectorDrawableCompat" /> 41 42 <TextView 43 android:id="@+id/textView7" 44 android:layout_width="match_parent" 45 android:layout_height="wrap_content" 46 android:text="作成" /> 47 </LinearLayout> 48 49 <LinearLayout 50 android:layout_width="wrap_content" 51 android:layout_height="wrap_content" 52 53 android:orientation="vertical"> 54 55 <ImageView 56 android:id="@+id/imageView3" 57 android:layout_width="80dp" 58 android:layout_height="wrap_content" 59 android:layout_weight="1" 60 app:srcCompat="@drawable/graph_down" /> 61 62 <TextView 63 android:id="@+id/textView8" 64 android:layout_width="match_parent" 65 android:layout_height="wrap_content" 66 android:text="TextView" /> 67 </LinearLayout> 68 69 <LinearLayout 70 android:layout_width="wrap_content" 71 android:layout_height="wrap_content" 72 android:orientation="vertical"> 73 74 <ImageView 75 android:id="@+id/imageView4" 76 android:layout_width="80dp" 77 android:layout_height="wrap_content" 78 android:layout_weight="1" 79 app:srcCompat="@drawable/clock01" /> 80 81 <TextView 82 android:id="@+id/textView" 83 android:layout_width="match_parent" 84 android:layout_height="wrap_content" 85 android:text="TextView" /> 86 </LinearLayout> 87 88 <LinearLayout 89 android:layout_width="wrap_content" 90 android:layout_height="wrap_content" 91 android:orientation="vertical"> 92 93 <ImageView 94 android:id="@+id/imageView5" 95 android:layout_width="80dp" 96 android:layout_height="wrap_content" 97 android:layout_weight="1" 98 app:srcCompat="@drawable/gear_haguruma" /> 99 100 <TextView 101 android:id="@+id/textView2" 102 android:layout_width="match_parent" 103 android:layout_height="wrap_content" 104 android:text="TextView" /> 105 </LinearLayout> 106 107 </LinearLayout> 108

イメージ説明

疑問点
一番外側のLinearLayoutに縦と横にmatch_parentを指定しているのに画面いっぱいにならない。
やりたいこと
表示サイズに合わせて縦、横を決定したい。

cやpythonはやったことがあるのですが、javaでandroidアプリを作成したのは昨日からはじめましたものです。教えていただけたらとても嬉しいです。よろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

このソースコードの外側に

java

1コード 2<androidx.constraintlayout.widget.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="wrap_content" 6 android:layout_height="wrap_content" 7 tools:context=".CameraActivity"> 8

があり、この中にwrap_contentがあったためでした。お騒がせいたしました。

投稿2020/06/05 02:57

oika77

総合スコア184

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問