Androidアプリケーションでインターネットからダウンロードしている画像があります。この画像をサイズ変更/拡大縮小したくありません。とにかく、画像の拡大縮小を止めることができますか?
ImageView の XML エントリは次のとおりです。
<ImageView
android:id="@+id/conditionImage"
android:scaleType="center"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/textMain"
android:contentDescription="@string/noaaLogoDescription" />
画像ビューに表示するための私のコードは次のとおりです。
BitmapFactory.Options bmpOptions = new Options();
bmpOptions.inScaled = false;
URL url = new URL("URLPATHTOIMAGE");
ImageView conditionImageView = (ImageView)findViewById(R.id.conditionImage);
InputStream content = (InputStream)url.getContent();
conditionImage = BitmapFactory.decodeStream(content, null, bmpOptions);
conditionImageView.setImageBitmap(conditionImage);
ImageView XML 要素の scaleType を、matrix、center、および centerInside を使用するように変更しようとしました。私の最後の試みは、上記のコードを使用して inScale を false に設定することでした。他のアイデアはありますか?
奇妙な部分は、これがエミュレーターで起こっていないことです。