Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Splash Screen Background for 18:9 Aspect Ratio (Samsung Galaxy S8)

Tags:

android

I have implemented a splash screen in android with a full image background using a drawable resource. This displays correctly on traditional screen aspect ratios. When I now run it in Samsung Galaxy S8 which has an aspect ratio of 18:9, the background image get's stretched vertically.

I shy away from using a layout as my splash screen as there will be a delay for the image to show up.

One thing I can think of is if we have a specific image sized for 18:9 but then how can I make it so that android will pick that specific image based on certain aspect ratio?

like image 786
Randal Cunanan Avatar asked Nov 26 '17 06:11

Randal Cunanan


1 Answers

Use screen aspect qualifier and make a different layout for long screen devices and Android will detect it.

enter image description here

like image 142
Rohit Avatar answered Nov 11 '22 09:11

Rohit