Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5672] MobileWeb: backgroundImage should stretch over all view.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-12-21T05:46:08.000+0000
Affected Version/sRelease 1.7.0, Release 3.0.0
Fix Version/sRelease 1.7.2, Sprint 2012-17 API, Release 3.0.0
ComponentsMobileWeb
LabelsMobileWeb, api, qe-testadded
ReporterJon Alter
AssigneeBryan Hughes
Created2011-09-13T04:18:20.000+0000
Updated2014-01-11T00:06:08.000+0000

Description

backgroundImage should stretch over all view. Current behavior: when property backgroundImage is defined in the object(view, label, button, etc) the image will not stretch to the height and width of the object. Example: size of background image is 50x50, size of the view is 100x100. Result: image fills only 1/4 of view space. Expected behavior: image should be stretched to the whole object. How to reproduce: run KS_HTML5 >> Table View >> Table View(Layout 2) >> look at the images of photo and calendar in the rows. They should be compressed to the view size.

Attachments

FileDateSize
btn_ship_dwn-2x.png2012-08-21T13:29:16.000+0000416

Comments

  1. Jon Alter 2012-08-21

    Reopening as a regression:

    Worked in 2.2.0.v20120710122120 Broken in 2.2.0.v20120821095711 Using Chrome Version 21.0.1180.79

    Steps to repro:

    1. copy the attached image into your project 2. Run the code below 3. notice that the image is not stretched over the whole view as it should be
       var win  = Ti.UI.createWindow({
       	backgroundColor: 'white'
       });
       win.open();
       var view = Ti.UI.createView({
       	backgroundImage: 'btn_ship_dwn-2x.png'
       });
       win.add(view);
       
  2. Jon Alter 2012-08-21

    Resolved by: https://github.com/appcelerator/titanium_mobile/pull/2793
  3. Lokesh Choudhary 2012-09-04

    Verified fix on: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120830141234 Chrome 21.0.xx Firefox 15 Safari 6.0 Android 4.0.4 default browser,chrome 18.0.xx ,firefox 15.0 Iphone 5.1.1 mobile safari

JSON Source