Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12880] Android: ImageView parity on Android, not rendering the image as expected

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2013-02-27T00:49:17.000+0000
Affected Version/sRelease 3.0.2
Fix Version/sn/a
ComponentsAndroid
Labelsqe-sdk3.0.2
ReporterSmitha Guduru
AssigneeIngo Muschenetz
Created2013-02-26T23:15:55.000+0000
Updated2014-06-19T12:43:29.000+0000

Description

While testing image rendering from a URL using the following code with imageView properties set to width: Ti.UI.FILL and height: Ti.UI.SIZE, there is a parity on how the image is being rendered on Android. Please see the attached screenshots for parity on Android vs iOS. This is not a regression. Also occurs on 3.0.0.GA and 2.1.4.GA. Steps to reproduce: 1. Create a Titanium app in the Studio 2. Copy the following code in the app.js 3. Build the app using SDK: 3.0.2.GA on an Android device
Ti.UI.backgroundColor = 'white';
   var win =Ti.UI.createWindow({
   });
   var view = Titanium.UI.createScrollView({
    layout: 'vertical',
    backgroundColor:'white',
    scrollType:'vertical'
   });
   win.add(view);
   var numObjects=10;
   for (var i = 0; i <numObjects; i++ ) {
   var image = Ti.UI.createImageView({
    image:'http://static.appcelerator.com/images/header/appc_logo.png',
    backgroundColor: 'black',
    width: Ti.UI.FILL,
    height: Ti.UI.SIZE
   });
   view.add(image);
   }
   //eval(name+myString);
   Ti.API.info("image"+ i);
   Ti.API.info(JSON.stringify(image));
   win.open();
Actual result: The Appcelerator logo is not being scaled correctly. Expected result: The Appcelerator logo should be scaled correctly.

Attachments

FileDateSize
AndroidImageView.png2013-02-26T23:15:55.000+000076656
iOSimageView.png2013-02-26T23:15:55.000+0000306544

Comments

  1. Smitha Guduru 2013-02-27

    Closing this issue as invalid since adding this code in the tiapp.xml is scaling the image as expected.
       <android xmlns:android="http://schemas.android.com/apk/res/android">
               <manifest>
                   <!-- auto scale elements -->
                   <supports-screens android:anyDensity="false"/>
       </manifest>
       </android>
       

JSON Source