0

I'm a newbie to App Inventor and stumbled on a little problem. It seemed easy at the beginning but I did not find an answer yet: Basically it's about getting a background image to fit all kinds of different device aspect ratios without distorting the image's proportions.

The orientation of my app will always be portrait (no landscape). To make the background picture fit every device size, I would like to center-align it horizontally (neither left- nor right-aligned) and make the picture's height always fill the screen's height. The width should scale proportionally (not distort the image)!. The left and right edges of the image can be cropped depending on the aspect ratio of the device (the main subject of the picture should be in the middle anyway, so whatever is cropped on the left and right is not that important).

Is it possible this way in App Inventor? Or is there another solution?

Any help will be gladly appreciated! Polar Bear

  • You need to provide different picture size so that you wont need to worry on pixelated results. – neferpitou May 26 '15 at 09:30
  • Not sure if I got you right. I plan to make the original image pixelwise as high as the biggest device's height (so for other devices it should be only scaled down, to avoid pixelated results) and as wide as the widest device's aspect ratio (so for other devices, the left and right borders will be cropped). [link](https://groups.google.com/forum/#!topic/programming-with-app-inventor/YFvv9-teDFc) scottfromscott describes a solution here to a similar problem as mine. But I cannot open his link unfortunately. :( – Polar Bear May 26 '15 at 10:52
  • You only need to do is provide your high resolution image and place it in your drawable folder then use [Picasso](http://square.github.io/picasso/) to crop your image easily. – neferpitou May 26 '15 at 11:28
  • Alright, where do I have access to the drawable folder in App Inventor? And can I use Picasso together with App Inventor? – Polar Bear May 26 '15 at 12:10
  • Yes you can access your image from your invi as long as you can provide the path, BTW Picasso accept the following parameter "website link","Drawable ID" and URI <- depends on your need. – neferpitou May 26 '15 at 12:20
  • I just downloaded Picasso, it seems to be a jar-File. How can I make use of it in App Inventor? I'm sorry if this is a stupid question, I'm actually a designer, not a coder ;). – Polar Bear May 26 '15 at 15:21
  • if you are using [Eclipse](http://stackoverflow.com/questions/3280353/how-to-import-a-jar-in-eclipse) , if you are using [Android Studio](http://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library) – neferpitou May 27 '15 at 02:04

0 Answers0