0

I tried 'float: left;', but when scrolling(slowly is clearer), only one list item scroll..but not numItem of one row..(But photos app built in palm pre ROM woks just fine)

In one file:

<div id="results-list" class='thumb-list' x-mojo-element="List"></div>

In another:

<ul>#{-listElements}</ul>

In another:

<li class='thumb-item'>
 <img src="#{-pic_idFormatted}"/>
</li>

The CSS:

/**
 * thumblist
 */
.thumb-list {
 padding: 12px;
}

.thumb-item {
 float: left;
 margin: 8px;
}

.thumb-item img {
 width: 80px;
 height: 80px;
 border-radius: 5px;
 border: 1px solid black;
}

The Script:

    this.resultsModel = {items: []};

this.controller.setupWidget('results-list', {
        itemTemplate:'thumb/search-result',
        listTemplate:'thumb/result-list',
        formatters:{pic_id:this.formatThumb.bind(this)},
        //renderLimit: 50,
        lookahead: 20,
        fixedHeightItems: true,
        initialAverageRowHeight:100,
        hasNoWidgets: true
    },
    this.resultsModel);

alt text

alt text

in the same grid

4

1 回答 1

0

<ul>应该换行<li>

<ul>#{-listElements}

<li class='thumb-item'>
 <img src="#{-pic_idFormatted}"/>
</li>

</ul>

但除此之外,您的其余问题都非常不清楚。

于 2010-09-10T08:26:02.823 回答