背景画像を画面いっぱいにするにはどうすればよいですか?私はいくつかの異なる提案を試みたが、何も動作していないようだ。以下はアプリの背景が画面に表示されない
私activity_main.xmlのためのコードです:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.andrewvanpeter.upandaway.MainActivity">
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/background_flat_720x1280" />
</android.support.constraint.ConstraintLayout>
match_parentソリューションが機能しませんでした。多分私は別の何か間違っているよ。しかし、背景を直接設定しても効果はありました。どうもありがとうございました! – CheetahBongos
問題ありません、それは喜びです!たぶんどこかに余白や余白があるかもしれません。あるいは、ImageViewに合わせる必要があります。 –