Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Titanium and webview in a Blackberry app

$
0
0

I've a Titanium app for Android and iOS. Now, I want to create the Blackberry version.

In my app I use webview to show graphs. I've tried it in Blackberry simulator, but I've found some problems:

  • Webview background color doesn't work. Although I put next code, webview has a white background color

  • How to make that webview fills its container? In iOS and Android, to support all densities, I make webview fills its container, so in all resolution will show ok, but this doesn't seem to work on Blackberry, or maybe is a simulator problem?

For Android and iOS, this is the code I use:

var webView = Titanium.UI.createWebView({
    width : '100%',
    height : '100%',
    backgroundColor : 'transparent',
    scalesPageToFit : true,
});
 
 
 
 
var webViewHtml5content = Ti.UI.createView({
    left : 47,
    right : 19,
    height : 100,
    bottom : 0,
    backgroundColor : 'transparent'
});
view.add(webViewHtml5content);
 
webView.width = webViewHtml5content.width;
webView.height = webViewHtml5content.height;
webViewHtml5content.add(webView);
 
webView.url = '/views/html5/html5Line.html';
And to fill its container, in html5Line I put:
$(document).ready(function() {
                graph = $('#graph');
                c = graph[0].getContext('2d');
                graphWidth = c.canvas.width = window.innerWidth;
                graphHeight = c.canvas.height = window.innerHeight;
 
            });
 
<body style="margin-left:0px;margin-top:0px;width: 100%;height: 100%">
            <canvas id="graph" style="display:block">
                [Canvas not supported]
            </canvas>
</body>
Do you know how can I do this?

I've Titanium SDK 3.2.2 and Blackberry 10.

Thank you very much


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>