[android] getDrawableがdeprecatedなので、その対処法
getDrawableがdeprecatedなので、その対処法
SDKバージョン 22でResources.getDrawable(int id)がdeprecatedだが
大体作成しているのはAPI15前後
新APIと旧APIを共存させるコードは以下の通り
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ return getDrawable(id); } else{ return getResources().getDrawable(id); }