Image is squeezed on Android
See original GitHub issueI noticed taht image is a bit squeezed because of the top and bottom bars and found a way to avoid it.
Here’s how my launch_screen.xml looks like now:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<ImageView
android:src="@drawable/launch_screen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
>
</ImageView>
</FrameLayout>
I am no Android developer and if there’s a way to optimize or simplify it, that would be great.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:50
- Comments:14 (1 by maintainers)
Top Results From Across the Web
How to De-Squeeze photos on Android : r/MOMENT - Reddit
Try Pictools app for photos (use Resize (Px) and multiply the pixel width by 1.33, make sure aspect ratio is not locked). Can...
Read more >android: stretch image in imageview to fit screen
I have an imageview that has its height and width set to fill_parent with a linearlayout that has the same values set. So...
Read more >Pixel feature request: Give us squeeze to take photos in ...
Pixel feature request: Give us squeeze to take photos in Google Camera ... Camera allows you to snap a quick photo with the...
Read more >Best stretch the picture apps for android In 2022 - Softonic
Find out the best stretch the picture apps for android, including Pixlr Express, Photo Warp, Pixlr and other top answers suggested and ranked...
Read more >Android Apps by Squeeze Cash on Google Play
Enjoy millions of the latest Android apps, games, music, movies, TV, books, magazines & more. Anytime, anywhere, across your devices.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It worked for me but I noticed that it increases the image ratio to force it to fill the screen like “background-size: cover” in CSS and I prefer “background-size: contain” so here is the new code:
@Jacse you are right. But still the image is squeezed if you use the layout from the docs. So I would at least place a note there.