02-25-2013 10:14 AM - edited 02-25-2013 03:38 PM
is it possible to change the font-size (height) of an image list?
I can change the background-color, color, font itself (f.e. Times)...but not the font-size!!
App is for BB10
webworks (BlackBerry 10 WebWorks SDK 1.0.4.7)
my definition of the image-list:
<div data-bb-type="screen" data-bb-effect="slide-left" data-bb-indicator="true">
<div style="background-color: #000">
<label id="caption" style="font-size: 36px; color: GhostWhite; width: 100%">Search result</label>
</div>
<div data-bb-type="image-list" id="resultlist" data-bb-context="true"></div>
<div data-bb-type="action-bar" data-bb-back-caption="Back"></div>
<div data-bb-type="context-menu">
<div data-bb-type="action" data-bb-img="img/phonecall.png" onclick="showToast('Call contact');">Call contact</div>
<div data-bb-type="action" data-bb-img="img/mail.png" onclick="showToast('Email contact');">Email contact</div>
<div data-bb-type="action" data-bb-img="img/addcontact.png" onclick="showToast('Add to contacts');">Add to cantacts</div>
<div data-bb-type="action" data-bb-img="img/salesinfo.png" onclick="showToast('Sales info');">Sales info</div>
<div data-bb-type="action" data-bb-img="img/location.png" onclick="showToast('View in Maps');">View in Maps</div>
</div>
</div>
my code for creating the list items:
function loadImageList(element) {
var resultList = element.getElementById('resultlist');
for (var i = 0; i < mc.count; i++) {
var item = document.createElement('div');
item.setAttribute('data-bb-type', 'item');
item.setAttribute('x-blackberry-focusable', 'true');
item.setAttribute('id', mc.contactarray[i].ID);
//item.setAttribute('style', 'font-size:20px');
if(i % 2 == 0) {
item.setAttribute('style', 'background-color:#f5f5f5');
//item.setAttribute('style', 'background-color:#f5f5f5;font-size:20px');
}
item.onclick = function() { showDetails(); };
if(mc.contactarray[i].Form == "Person") {
item.setAttribute('data-bb-title', mc.contactarray[i].Lastname + " " + mc.contactarray[i].Firstname);
item.setAttribute('data-bb-img', 'img/person.png');
item.innerHTML = mc.contactarray[i].Company;
} else {
item.setAttribute('data-bb-title', mc.contactarray[i].Company);
item.setAttribute('data-bb-img', 'img/company.png');
item.innerHTML = mc.contactarray[i].Zip + " " + mc.contactarray[i].City;
}
resultList.appendChild(item);
}
}
Thx.
02-25-2013 11:34 AM
what about this ?
listItem.setAttribute('style', 'font-size:32px; font-weight:bold;background-color:#000');
Try my HTML5 app CountDown (free)
02-25-2013 11:43 AM
I tried it...see the commented statements in function loadImageList....no effect.
I also tried it in the html file with css...no effect!
02-25-2013 11:53 AM
Testing with ripple ? if then, did you try after clean browser history ? bcoz.. it works like here
Try my HTML5 app CountDown (free)
02-25-2013 12:03 PM - edited 02-25-2013 03:40 PM
I tested it with:
Ripple
VM Simulator
BB10 Alpha
Z10 device
I also cleared the browser cache several times!
By the way:
when I change the font size on the device (settings), the font height in the app isn't changed!!
Its always the same size.
If I change the font size for the title of the screen:
<div style="background-color: #000">
<label id="caption" style="font-size: 36px; color: GhostWhite; width: 100%">Search result</label>
</div>...that works!