0
私は自分のアプリの背景として画像を設定しようとしています。 Androidスタジオのプレビューで見ることができますが、携帯電話(Android 5)にアプリを読み込むと画像が表示されません。これがコードです。私はAndroidの世界では新しいです。Androidスタジオの背景が動作しません
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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"
android:fitsSystemWindows="true"
tools:context="lorenzobenevento.mydomotics.MainActivity"
android:background="@drawable/background">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
</android.support.design.widget.CoordinatorLayout>
ありがとうございました。私の悪い英語を申し訳ありません。
はい、わかっています。コーディネーターに背景を設定したいのは、私のアプリに荒れたツールバーが必要なので、画面にマッチする背景が必要だからです。 「content_main」を設定すると、背景はアプリの「本体」にのみ表示されます。私はcontent_mainの背景にアルファチャンネルを設定しようとしましたが、何も起こりませんでした。 –