Bitmap vs R.drawable
Bitmap vs R.drawable I'm making an app in which I allow the users to upload their own images. The app first used R.drawable but since I wanted the users to upload their own images I had to change everything into Bitmap. Now I'm getting an error and as far as I can now it's because the CPU is overloaded. Is it better to use R.drawable instead of Bitmaps for a RecycleView? This is the code: public void addBasicDices(){ if (DicesList == null){ DicesList = new ArrayList<>(); } if (DicesList.size() < 8){ //Clears the list to avoid having twice the amount of dices in case of being less than 8 (E.g when I update the minimum amount of basic dices, adding d100 for example) DicesList.clear(); //Add coin to DicesList Dice2R.add(R.drawable.coin_tail); Dice2R.add(R.drawable.coin_head); diceicon = BitmapFactory.decodeResource(this.getResources(), R.drawable.coin_head); for (int i = 0; i<Dice2R.size();...
