0
私はアプリを持っており、アンドロイドストアに公開されました。私は3つの異なるデバイスにインストールしました。アンドロイドイメージのBGがすべてのデバイスを表示していません
それはネクサス5
それはネクサス7(タブレット)で動作しますそれはしかし、私のLGのG3上では動作しません
に取り組んでいます。私のコードで
私は描画可能としてバックグラウンドを持っている、のサイズは748 X 1067で 私content_activity.xmlで背景が
<RelativeLayout 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:id="@+id/content_secret"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.secret.secret.secret.secret"
tools:showIn="@layout/activity_secret"
android:paddingBottom="@dimen/thin_margin"
android:paddingEnd="@dimen/thin_margin"
android:paddingLeft="@dimen/thin_margin"
android:paddingRight="@dimen/thin_margin"
android:gravity="center_horizontal"
android:background="@drawable/old_paper_texture"
android:backgroundTintMode="add">
を設定しているRelativeLayout私のルートノードは、なぜ、このいずれかの理由があります一部のデバイスでは動作しませんか?私はそれがイメージサイズのものかもしれないと感じます...しかし、それは動作していない電話よりも大きいタブレットで動作します。
あなたはLDPI(低)〜120dpi MDPI(中)〜160dpi hdpi(高)〜240dpi xhdpi(超高)、全ての濃度でリソースを追加しました〜320dpi を使用すべきxxhdpi(extra-extra-high)〜480dpi xxxhdpi(extra-extra-extra-high)〜640dpi – Starlord
いいえ...どうやってそれをやりますか?私は画像をCtrl + Cキーでドラッグして、それをドロウアブルフォルダに貼り付けるように教えられました。だから、私は – 173901
のこのドキュメントを見てきました。https://developer.android.com/guide/practices/screens_support.html基本的には、複数のバージョンの背景イメージを作成して関連する密度の高いリソースディレクトリでは、アンドロイドはデバイスに基づいて選択するリソースを決定します。 – Starlord