Skip to content

Instantly share code, notes, and snippets.

@jumbo-in-Jap
Last active September 12, 2017 06:33
Show Gist options
  • Save jumbo-in-Jap/c38623cec56cfd7a31019addd708b365 to your computer and use it in GitHub Desktop.
Save jumbo-in-Jap/c38623cec56cfd7a31019addd708b365 to your computer and use it in GitHub Desktop.
// 画像:resourcesからidを指定して取得する
val drawable = ResourcesCompat.getDrawable(resources, R.drawable.icon, null)
// リソース:同様
val text = context.resources.openRawResource(R.raw.text_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment