365連休

にわかのandroidとかの開発メモ。

drawableディレクトリ、mipmapディレクトリ

mipmapはAndroid4.2からサポートされたため、minSDKがそれより古いならdrawableディレクトリにも画像リソースを置いておく必要がある。と解釈。 

 

qiita.com

 

developer.android.com

Mipmapping for drawables

Using a mipmap as the source for your bitmap or drawable is a simple way to provide a quality image and various image scales, which can be particularly useful if you expect your image to be scaled during an animation. Android 4.2 (API level 17) added support for mipmaps in the Bitmap class—Android swaps the mip images in your Bitmap when you've supplied a mipmap source and have enabled setHasMipMap(). Now in Android 4.3, you can enable mipmaps for a BitmapDrawable object as well, by providing a mipmap asset and setting the android:mipMap attribute in a bitmap resource file or by calling hasMipMap().

 

Android 4.2(API17)でmipmapのサポートを追加しましたよー。…と書いてある?