Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20113] Android: Rounded view is not being shown if its size more than screen size

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-12-15T08:19:35.000+0000
Affected Version/sRelease 5.1.1
Fix Version/sRelease 5.2.0
ComponentsAndroid
Labelsandroid
ReporterFix Please
AssigneeAshraf Abu
Created2015-11-22T08:32:48.000+0000
Updated2017-05-12T19:48:24.000+0000

Description

var size = 400;

var view = Ti.UI.createView({
  zIndex: 0,
  
  backgroundColor: 'green',
  opacity: 0.7,

  borderColor: 'green',
  borderWidth: size / 2,
  borderRadius: size / 2,

  width: size,
  height: size,

  left: 50,
  top: 5,
});
$.index.add(view);

size = 490;

var view = Ti.UI.createView({
  zIndex: 0,
  
  backgroundColor: 'red',
  opacity: 0.7,

  borderColor: 'red',
  borderWidth: size / 2,
  borderRadius: size / 2,

  width: size,
  height: size,

  left: 50,
  top: 150,
});
$.index.add(view);

var view = Ti.UI.createView({
  zIndex: 0,
  
  backgroundColor: 'blue',
  opacity: 0.7,

  width: size,
  height: size,

  left: 50,
  top: 300,
});
$.index.add(view);

$.index.open();

Attachments

FileDateSize
ViewSizeTest.jpg2015-11-22T08:31:48.000+000091822

Comments

  1. Ashraf Abu 2015-12-15

    Managed to reproduce with this message in the logs:-
       [WARN] :   Resources: Converting to string: TypedValue{t=0x5/d=0x2401 a=1 r=0x10500ce}
       [WARN] :   Resources: Converting to string: TypedValue{t=0x5/d=0x3001 a=1 r=0x10500d0}
       [WARN] :   View: View too large to fit into drawing cache, needs 23040000 bytes, only 8294400 available
       
    and
       12-15 02:58:07.164 14553 14553 W View    : TiBorderWrapperView not displayed because it is too large to fit into a software layer (or drawing cache), needs 31360000 bytes, only 14745600 available
       12-15 02:58:07.164 14553 14553 W View    : TiBorderWrapperView not displayed because it is too large to fit into a software layer (or drawing cache), needs 31360000 bytes, only 14745600 available
       
  2. Ashraf Abu 2015-12-15

    Classic app.js to reproduce:-
       var win = Ti.UI.createWindow({
           title : 'Test',
           backgroundColor: 'black'
       });
        
        
       var size = 400;
        
       var view = Ti.UI.createView({
         zIndex: 0,
         
         backgroundColor: 'green',
         opacity: 0.7,
        
         borderColor: 'green',
         borderWidth: size / 2,
         borderRadius: size / 2,
        
         width: size,
         height: size,
        
         left: 50,
         top: 5,
       });
       win.add(view);
        
       size = 800;
        
       var view = Ti.UI.createView({
         zIndex: 0,
         
         backgroundColor: 'red',
         opacity: 0.7,
        
         borderColor: 'red',
         borderWidth: size / 2,
         borderRadius: size / 2,
        
         width: size,
         height: size,
        
         left: 50,
         top: 150,
       });
       win.add(view);
        
       var view = Ti.UI.createView({
         zIndex: 0,
         
         backgroundColor: 'blue',
         opacity: 0.3,
        
         width: size,
         height: size,
        
         left: 50,
         top: 300,
       });
       win.add(view);
        
       win.open();
       
  3. Ashraf Abu 2015-12-15

    Tested with 5_2_0. This seems to be working well.
  4. Ashraf Abu 2015-12-15

    Resolving this as Fixed as the 5_2_0 branch faces no issues with this.
  5. Lokesh Choudhary 2016-01-15

    Verified with latest 5.2.0 SDK & issue is not seen. Closing. Environment: Appc Studio : 4.5.0.201601131150 Ti SDK : 5.2.0.v20160114021251 Ti CLI : 5.0.5 Alloy : 1.7.26 MAC Yosemite : 10.10.5 Appc NPM : 4.2.2 Appc CLI : 5.1.0 Node: v0.12.27 Nexus 6P - Android 6.0 Nexus 5 - Android 5.1.1 Genymotion Emulator: Android 5.1.0
  6. Michael Gangolf 2016-08-11

    With 5.4.0.v20160802165655 the red circle is gone again:
       [WARN]  View: TiBorderWrapperView not displayed because it is too large to fit into a software layer (or drawing cache), needs 23040000 bytes, only 8294400 available
       [WARN]  View: TiBorderWrapperView not displayed because it is too large to fit into a software layer (or drawing cache), needs 23040000 bytes, only 8294400 available
       [WARN]  View: TiBorderWrapperView not displayed because it is too large to fit into a software layer (or drawing cache), needs 23040000 bytes, only 8294400 available
       
  7. Joshua A. Ceaser 2016-09-22

    I am seeing this issue in 5.3.1 and 5.4 as well. I have a view with borderRadius 2dp and the content is larger than the screen. It doesn't happen on all android devices just the smaller ones.
  8. Joshua A. Ceaser 2016-09-22

    I also have the same issue in 5.5.
  9. Jeff Antram 2016-11-15

    +1 - Same issue on 5.5.1
  10. David Jones 2016-12-16

    +1 - Having issue on 6.0.0.GA
  11. Fix Please 2017-05-11

    lol
  12. Mike Stancliffe 2017-05-12

    Seeing this as well.... 5.5.1

JSON Source