Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Scale up ImageView on Android doesn?t work

$
0
0

I develop app for Android using Titanium 2.3.2 on Windows 7.

I want to scale up the image and keep the proportions. I use such code:

var logo = Titanium.UI.createImageView({
    image: '/images/logo.png',
    width: pWidth,
    top: '10dp'
});
Everything works fine when pWidth is smaller than image width (image is scaled down with same proportions). But when pWidth is bigger than image width then image is not scaled up. It works when I add height property (image is scaled properly no matter if pWidth is bigger or smaller than image width). It is not acceptable solution because I loose proportions (I don't know what image proportions are).

Is there any way around? I tried it with height: 'auto' but it doesn't work. I read that it is only Android issue.

Thanks in advance for any help.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>