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

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

新規登録して質問してみよう
ただいま回答率
85.48%
Android Studio

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

Q&A

1回答

1862閲覧

AndroidStudio ImageViewを最前面に表示

uhsi

総合スコア57

Android Studio

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

0グッド

0クリップ

投稿2019/06/26 12:26

編集2019/06/26 12:30

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=".QuestionActivity"> 8 9 <TextView 10 android:id="@+id/numberText" 11 android:layout_width="wrap_content" 12 android:layout_height="wrap_content" 13 android:layout_marginStart="8dp" 14 android:layout_marginLeft="8dp" 15 android:layout_marginTop="8dp" 16 android:text="Q1" 17 android:textSize="50dp" 18 app:layout_constraintStart_toStartOf="parent" 19 app:layout_constraintTop_toTopOf="parent" /> 20 21 <TextView 22 android:id="@+id/questionText" 23 android:layout_width="wrap_content" 24 android:layout_height="wrap_content" 25 android:layout_marginStart="8dp" 26 android:layout_marginLeft="8dp" 27 android:layout_marginTop="50dp" 28 android:layout_marginEnd="8dp" 29 android:layout_marginRight="8dp" 30 android:text="こんにちは" 31 android:textSize="50dp" 32 app:layout_constraintEnd_toEndOf="parent" 33 app:layout_constraintStart_toStartOf="parent" 34 app:layout_constraintTop_toBottomOf="@+id/numberText" /> 35 36 <Button 37 android:id="@+id/button1" 38 android:layout_width="match_parent" 39 android:layout_height="wrap_content" 40 android:layout_marginStart="8dp" 41 android:layout_marginLeft="8dp" 42 android:layout_marginTop="30dp" 43 android:layout_marginEnd="8dp" 44 android:layout_marginRight="8dp" 45 android:onClick="onButton" 46 android:text="hello" 47 android:textSize="45dp" 48 app:layout_constraintEnd_toEndOf="parent" 49 app:layout_constraintStart_toStartOf="parent" 50 app:layout_constraintTop_toBottomOf="@+id/questionText" /> 51 52 <Button 53 android:id="@+id/button2" 54 android:layout_width="match_parent" 55 android:layout_height="wrap_content" 56 android:layout_marginStart="8dp" 57 android:layout_marginLeft="8dp" 58 android:layout_marginTop="8dp" 59 android:layout_marginEnd="8dp" 60 android:layout_marginRight="8dp" 61 android:onClick="onButton" 62 android:text="hello2" 63 android:textSize="45dp" 64 app:layout_constraintEnd_toEndOf="parent" 65 app:layout_constraintHorizontal_bias="1.0" 66 app:layout_constraintStart_toStartOf="parent" 67 app:layout_constraintTop_toBottomOf="@+id/button1" /> 68 69 <Button 70 android:id="@+id/button3" 71 android:layout_width="match_parent" 72 android:layout_height="wrap_content" 73 android:layout_marginStart="8dp" 74 android:layout_marginLeft="8dp" 75 android:layout_marginTop="8dp" 76 android:layout_marginEnd="8dp" 77 android:layout_marginRight="8dp" 78 android:onClick="onButton" 79 android:text="hello3" 80 android:textSize="45dp" 81 app:layout_constraintEnd_toEndOf="parent" 82 app:layout_constraintStart_toStartOf="parent" 83 app:layout_constraintTop_toBottomOf="@+id/button2" /> 84 85 <Button 86 android:id="@+id/button4" 87 android:layout_width="match_parent" 88 android:layout_height="wrap_content" 89 android:layout_marginStart="8dp" 90 android:layout_marginLeft="8dp" 91 android:layout_marginTop="8dp" 92 android:layout_marginEnd="8dp" 93 android:layout_marginRight="8dp" 94 android:onClick="onButton" 95 android:text="hello4" 96 android:textSize="45dp" 97 app:layout_constraintEnd_toEndOf="parent" 98 app:layout_constraintStart_toStartOf="parent" 99 app:layout_constraintTop_toBottomOf="@+id/button3" /> 100 101 <ImageView 102 android:layout_width="300dp" 103 android:layout_height="300dp" 104 android:layout_marginStart="8dp" 105 android:layout_marginLeft="8dp" 106 android:layout_marginTop="8dp" 107 android:layout_marginEnd="8dp" 108 android:layout_marginRight="8dp" 109 android:layout_marginBottom="8dp" 110 android:src="@drawable/good" 111 app:layout_constraintBottom_toBottomOf="parent" 112 app:layout_constraintEnd_toEndOf="parent" 113 app:layout_constraintStart_toStartOf="parent" 114 app:layout_constraintTop_toTopOf="parent" /> 115 116</android.support.constraint.ConstraintLayout>

ImageViewを最前面に表示させたいのですが最背面に表示されてしまいます。
XMLだけで編集する方法はあるのでしょうか。
また、Javaで変更できるのでしょうか。

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

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

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

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

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

guest

回答1

0

Zオーダー や Zインデックス でお調べになっては如何でしょうか.

投稿2019/06/26 12:36

jimbe

総合スコア12646

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

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

uhsi

2019/06/27 10:07

ご回答ありがとうございます。詳しく解説していただけるとありがたいです。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問