Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
リソースを使用する代わりに、ファイル名を指定して画像を表示する必要があります。たとえばshowImage("background.png")、の代わりにshowImage(R.drawable.background)。
showImage("background.png")
showImage(R.drawable.background)
誰でも方法を知っていますか?
どうもありがとう。
public static Bitmap decodeFile (String pathName, BitmapFactory.Options opts)
オプションは必須ではありませんが、大きな画像を表示したい場合は、オプションも指定する必要があります。