Faced the following situation: my activity causes another activity through Intent, adding to this Intent the name of the file that the invoked Intent should open (let it be for example p1). For each such p1 file, there is a corresponding image p1.jpg , which must be added to the ImageView for all the same called activity. So, is it possible for me to somehow make the opening of this picture a more universal method than for each file to make my own case , by type:
switch (path){ case "p1": //добавить p1.jpg break; ... }
id, and not the name of the resource? - woesss