I am in trouble how can I access the drawable icons.png inside in the drawable folder (-hdpi,-mdpi,-xhdpi,-xxhdpi,-xxxhdpi) ?. because I want to place it to my listview. I am using api 23
MainActivity.java
public class MainActivity extends AppCompatActivity {
private String somevar;
Integer[] myImg= {
ContextCompat.getDrawable(this,R.drawable.)//it's not recognizing.
};
....
....
}
drawable-?
folders out ofdrawable
, as a direct child ofres
. Also, makedrawable
a separate folder - also a child ofres
, and put a copy of the images (the size you want) inside it. See structure here: developer.android.com/guide/topics/resources/… – Alaa M.