画面の幅に合わせてTheTVDB (例http://thetvdb.com/banners/graphical/84947-g6.jpg ) から TV バナーを取得する方法を見つけようとしています。これでそこにたどり着きますが、余白を設定するために空白を入れたくありません。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.android.volley.toolbox.NetworkImageView
android:id="@+id/poster"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:scaleType="fitXY" />
</LinearLayout>
ただし、を削除するandroid:layout_margin="8dp"
と、突然最初のバナーの半分が読み込まれますが、他のバナーは表示されません。
width
and/orheight
を設定して and を削除しようとしましたがwrap_content
、正常に動作しますが、バナーが画面全体に広がりません。margin
scaleType