Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 21
Registered: ‎01-13-2011
My Device: 9700 / Playbook
My Carrier: Vodafone

Font of image-list

[ Edited ]

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.

 

Trusted Contributor
Posts: 107
Registered: ‎07-26-2012
My Device: Blackberry Z10
My Carrier: airtel

Re: Font of image-list

what about this ?

 

listItem.setAttribute('style', 'font-size:32px; font-weight:bold;background-color:#000');



Try my HTML5 app CountDown (free)


Click Accept as Solution if this post that have solved your issue(s)!
Like if you found this post useful..
Contributor
Posts: 21
Registered: ‎01-13-2011
My Device: 9700 / Playbook
My Carrier: Vodafone

Re: Font of image-list

I tried it...see the commented statements in function loadImageList....no effect.

I also tried it in the html file with css...no effect!

 

Highlighted
Trusted Contributor
Posts: 107
Registered: ‎07-26-2012
My Device: Blackberry Z10
My Carrier: airtel

Re: Font of image-list

Testing with ripple ? if then, did you try after clean browser history ? bcoz.. it works like here



Try my HTML5 app CountDown (free)


Click Accept as Solution if this post that have solved your issue(s)!
Like if you found this post useful..
Contributor
Posts: 21
Registered: ‎01-13-2011
My Device: 9700 / Playbook
My Carrier: Vodafone

Re: Font of image-list

[ Edited ]

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!