I created a ViewA class where I get two images from the drawable folder and draw on the screen with draw ();
public class ViewA extends View {
private Bitmap img1;
private Bitmap img2;
public ViewA(Context context){
super(context);
img1 = BitmapFactory.decodeResource(getResources(), R.drawable.imagem01);
img2 = BitmapFactory.decodeResource(getResources(), R.drawable.imagem02);
}
public void draw(Canvas canvas){
super.draw(canvas);
canvas.drawBitmap(img1, 0, 0, null);
canvas.drawBitmap(img2, 0, 0, null);
}
}
and here is MainActtivity
public class MainActivity extends AppCompatActivity {
private ViewA view;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
view = new ViewA(this);
setContentView(view);
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
}
It's full screen, however, when you take pictures and draw them on the screen, assuming it's a 1920x1080 resolution image, the images will be cropped and only a part of the image will appear. I wanted to know if you can put these whole images on the screen !! without being cut.