Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8451] Android: You can't modify the view border multiple times

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-05T12:26:15.000+0000
Affected Version/sRelease 2.0.0, Release 1.8.2
Fix Version/sRelease 2.0.2, Release 2.1.0, Sprint 2012-07, Release 1.8.3
ComponentsAndroid
LabelsSupportTeam, api, module_views, qe-manualtest
ReporterMauro Parra-Miranda
AssigneeHieu Pham
Created2012-03-30T12:00:10.000+0000
Updated2014-08-08T21:26:09.000+0000

Description

Problem Description

The customer is trying to modify the view's border width as the user's interact with it, and it never changes.

Actual results

the view's border width doesn't change

EXpected results

being able to modify the view's border width as needed.

Test case.

1. Create a new mobile project for android 2. Paste this code in app.js
var win1=Ti.UI.createWindow({
                  layout:'vertical',
                  backgroundColor:'gray',
                  exitOnClose:true,
                  navBarHidden:true
                });

var MyBox=Ti.UI.createView({height:310,
                            width:310,
                            backgroundColor:'white',
                            borderWidth:2,
                            borderColor:'silver',
                            top:30
                           });
var TheLabel=Ti.UI.createLabel({
        color:'black',
        text:'View border width should double when clicked',
        width:'auto'
     });
MyBox.add(TheLabel);

function BiggerBorder()
{
  MyBox.borderWidth*=2;
  MyBox.borderColor='red';
  Ti.API.info('MyBox.borderWidth expanded to '+MyBox.borderWidth);
}                           
MyBox.addEventListener('click',BiggerBorder);
win1.add(MyBox);

win1.open();

Comments

  1. Shawn Lipscomb 2012-03-30

    Clarification: The borderWidth *never* changes, even the first time BiggerBorder() is called. The borderColor *does* change the first time, to prove that the routine is being executed. HD ticket: https://support.appcelerator.com/tickets/APP-121747
  2. Mauro Parra-Miranda 2012-03-30

    Shawn, thanks for the clarification. Excuse my bad sight ;) Best, Mauro
  3. Shawn Lipscomb 2012-04-17

    Verified fixed in SDK 2.1.0.v20120416160358. Thanks!
  4. Natalie Huynh 2012-05-08

    Tested with 2.0.2.v201205151714 on Nexus One 2.2.2

JSON Source