Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26291

Android: setting view.borderRadius and opacity < 1 causes top of view to be cut off

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Release 7.2.0, Release 8.0.2
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Description

      Hi,

      Firstly this is happening on Android < 5.

      I believe this relates to https://jira.appcelerator.org/browse/TIMOB-24898

      I left a comment there but saw there was already another comment from November 2017 so I asked and was advised to open a new ticket.

      As the title states - when creating a view and setting borderRadius > 0 and opacity < 1 this causes top of child content to be cut off. ie not displayed.

      I have attached screenshots of it both working and not working.

      Steps to reproduce:
      1. Build a new clean alloy app
      2. Add the following code to index.js
      3. Notice the top of the child view gets cut off.
      4. To fix - remove borderRadius / opacity value and build again and the child view will no longer be cut off

      // create alertView container
      var alertView = Ti.UI.createView({
      	 backgroundColor:'white',
      	 opacity: 0.90,
      	 borderRadius: 5,
      	 width: "85%",
      	 height: '200dp',
      	 layout: 'vertical',
      });
       
      // create alertTitleView
      var alertTitleView = Ti.UI.createView({
        width: Ti.UI.FILL,
        height: Ti.UI.SIZE,
      });
       
      // create alertTitleLabel
      var alertTitleLabel = Ti.UI.createLabel({
        text: "This is a long test title This is a long test title This is a long test title This is a long test title",
        color: 'black',
        textAlign: 'center',
        touchEnabled: false,	
        top: "15dp",
        left: 5,
        right: 5,
        font: {
      			fontSize: '20dp',
      		}
      });
       
      alertTitleView.add(alertTitleLabel);
      alertView.add(alertTitleView);
       
      $.main.backgroundColor = "black";
       
      $.main.add(alertView);
      	  
      $.main.open();
      

        Attachments

          Activity

            People

            • Assignee:
              amukherjee Abir Mukherjee
              Reporter:
              dieskim David van de Meer
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6518
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code