SearchSpec.Builder.SetResultGrouping(Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定每個群組回傳的最大結果數量,群組依分組類型定義。
[Android.Runtime.Register("setResultGrouping", "(II)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=31)]
public Android.App.AppSearch.SearchSpec.Builder SetResultGrouping(int groupingTypeFlags, int limit);
[<Android.Runtime.Register("setResultGrouping", "(II)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=31)>]
member this.SetResultGrouping : int * int -> Android.App.AppSearch.SearchSpec.Builder
參數
- groupingTypeFlags
- Int32
一個非零組合 PerPackage、 PerNamespace、 PerSchema,投射為 int。
- limit
- Int32
每組 GroupingTypeFlags 可返回的結果數量。
傳回
這個建商實例。
- 屬性
備註
設定每個群組回傳的最大結果數量,群組依分組類型定義。 呼叫此方法會覆蓋先前所有呼叫。 因此,呼叫 setResultGrouping(GROUPING_TYPE_PER_PACKAGE, 7) 並呼叫 setResultGrouping(GROUPING_TYPE_PER_PACKAGE, 2) 只會套用後者,且每個套件最多只能有兩個結果。 或者呼叫 setResultGrouping (GROUPING_TYPE_PER_PACKAGE, 1) 再呼叫 setResultGrouping (GROUPING_TYPE_PER_PACKAGE |GROUPING_PER_NAMESPACE, 5) 會讓每個包裹在每個命名空間產生五個結果。
Android 參考資料。android.app.appsearch.SearchSpec.Builder.setResultGrouping
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。