I am making a 2D platformer type game. I made a ImageView using JAVA, that Is supposed to be about twice the size of the screen horizontally.
However, when the ImageView is displayed no matter the size of the Image, it keeps re-sizing to fit my screen . Note that I am not using XML, but I am purely using JAVA. How can I prevent this?
Here is the code:
ConstraintLayout gameLayout;
gameLayout = findViewById(R.id.gameLayout);
ImageView map = new ImageView(this);
map.setImageResource(R.drawable.tutorial_map);
map.setX(0);
map.setY(0);
gameLayout.addView(map);
Feel free to edit further if necessary.