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

Reply
Developer
Zukka
Posts: 201
Registered: ‎05-08-2012
My Device: PlayBook 64 Gb and Z10 LE
Accepted Solution

imageList

Hello everyone, I created a ImageList only the title and description leave the screen. how can I set the indent?

 

my function:

 

function dataOnLoad_initialLoad(feedsXML) {
var dataList = document.getElementById('dataList');
var titles = feedsXML.getElementsByTagName('title');
var descriptions = feedsXML.getElementsByTagName('description');

for (var i = 1; i < titles.length; i++) { 
var title = titles[i].firstChild.nodeValue;
var description = descriptions[i].firstChild.nodeValue;
var immagine = document.createElement('div');
immagine.innerHTML = descriptions[i].textContent;
var imgUrl = immagine.getElementsByTagName("img")[0].getAttribute("src");
var linkUrl = immagine.getElementsByTagName("a")[0].getAttribute("href");
var testoArt = immagine.getElementsByTagName("p")[0].innerText;
listItem = document.createElement('div');
listItem.id = i;
listItem.setAttribute('data-bb-title',title);
listItem.setAttribute('data-bb-type', 'item');
listItem.setAttribute('data-bb-img', imgUrl);
listItem.setAttribute('data-bb-link',linkUrl);

listItem.onclick = function() { onItemSelected('test'); };
listItem.innerHTML = testoArt;
dataList.appendItem(listItem);
if (bb.scroller) {
bb.scroller.refresh();
}

}
};

 

and screen.htm :

 

<div data-bb-type="round-panel" >
      <div data-bb-type="scroll-panel" id = "myPanel">
          <div data-bb-type="image-list" data-bb-image-effect="fade" id="dataList" style="background-color: #FFFFFF" ></div>
     </div>
</div>

_______________________________________________

If U like my post click on LIKE :smileywink:
Developer
Zukka
Posts: 201
Registered: ‎05-08-2012
My Device: PlayBook 64 Gb and Z10 LE

Re: imageList

I resolved it. I change white-space: nowrap; to white-space: wrap; in bbui.css

_______________________________________________

If U like my post click on LIKE :smileywink: