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

Android: html styles not getting applied correctly in WebView in SDK 6.3.0.GA

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: None
    • Resolution: Won't Fix
    • Affects Version/s: Release 6.3.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:

      CLI 6.3.0
      SDK 6.3.0
      Android 6.0

    • Story Points:
      5
    • Sprint:
      2018 Sprint 02 SDK, 2018 Sprint 03 SDK

      Description

      Reproduce

      1. Use the following simple code in an alloy project.

      index.xml

      <Alloy>
      	<Window onOpen="onWinOpen">
      		<View class="imgContainer" height="65%">
      			<WebView id="captureImg1"/>
      		</View>
      	</Window>
      </Alloy>
      

      index.js

      function onWinOpen() {
       
      	tempImageFile1 = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'GetImage1.png');
       
      	Ti.API.info('onWebViewLoad', JSON.stringify(tempImageFile1));
      	imageStyle = ' height:100%;position:absolute;';
      	
      	html = "<html><head><meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=10.0, minimum-scale=.25, user-scalable=1'/></head><body onload='onLoad()'><script>function onLoad(){Ti.App.fireEvent('app:imageLoad');}</script><img src='" + tempImageFile1.nativePath + "' style='" + imageStyle + "'/></body></html>";
       
      	$.captureImg1.setHtml(html);
       
      }
       
      $.index.open();
      

      1. Copy of project Project
      2. Run the project in an android device.
      3. You will see the image doesn't show-up.

      Note

      1. This is only happened in SDK 6.3.0.GA
      2. It is working well in SDK 6.2.2.GA

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                sliang Shuo Liang
              • Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code