简体   繁体   English

Netmera Android SDK分页

[英]Netmera Android SDK Pagination

What is the purpose of setPage() function of NetmeraService in Netmera Android SDK ? Netmera Android SDKNetmeraService的setPage()函数的目的是什么? For example, when we search as setPage(3) and setMax(10), is it creating a query for 30 results and respond as pages of 10? 例如,当我们搜索setPage(3)和setMax(10)时,它是否创建了30个结果的查询并作为10页的页面进行响应?

setPage() and setMax() methods are used to make pagination during the search, but they are not used as you describe. setPage()setMax()方法用于在搜索过程中进行分页,但不会像您描述的那样使用它们。

setMax() method is used to define total number of results returned from the search. setMax()方法用于定义从搜索返回的结果总数。 Default value of setMax() is 10. For example, if you set setMax(15) then 15 result will be returned as a search result in each call. setMax()默认值为10.例如,如果设置setMax(15)则每次调用将返回15个结果作为搜索结果。

setPage() is used to retrive the contents of the given page. setPage()用于检索给定页面的内容。 Default value of setPage() is 0 . setPage()默认值为0。 if you set setPage(1) then it will skip page*max content and retrieve the other max content. 如果你设置setPage(1)然后它将跳过page*max内容并检索其他max内容。

For example, if you set setPage(1) and setMax(20) then, it will skip 1*20 contents and retrieve the contents between 21-41. 例如,如果您设置setPage(1)setMax(20) ,它将跳过1 * 20内容并检索21-41之间的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM