1185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert/* 2185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * Copyright (C) 2009 The Android Open Source Project 3185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * 4185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * Licensed under the Apache License, Version 2.0 (the "License"); 5185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * you may not use this file except in compliance with the License. 6185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * You may obtain a copy of the License at 7185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * 8185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * http://www.apache.org/licenses/LICENSE-2.0 9185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * 10185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * Unless required by applicable law or agreed to in writing, software 11185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * distributed under the License is distributed on an "AS IS" BASIS, 12185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * See the License for the specific language governing permissions and 14185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * limitations under the License. 15185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert */ 16185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert 17185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringertpackage com.android.quicksearchbox.ui; 18185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert 19185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert/** 20185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert * Listener interface for clicks on suggestions. 21185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert */ 22185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringertpublic interface SuggestionClickListener { 23145693e12b77c193a65b7eaa038a272dd1f48f33Bjorn Bringert 24fde948e69f59589cf0d217ea414af7947de600bbBjorn Bringert /** 25fde948e69f59589cf0d217ea414af7947de600bbBjorn Bringert * Called when a suggestion is clicked. 26fde948e69f59589cf0d217ea414af7947de600bbBjorn Bringert * 277010c51b51c97fa43d7b24d2158ecbc1d064e0a6Bjorn Bringert * @param adapter Adapter that contains the clicked suggestion. 287a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood * @param suggestionId The ID of the suggestion clicked. If the suggestion list is flat, this 297a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood * will be the position within the list. 30fde948e69f59589cf0d217ea414af7947de600bbBjorn Bringert */ 317a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood void onSuggestionClicked(SuggestionsAdapter<?> adapter, long suggestionId); 32145693e12b77c193a65b7eaa038a272dd1f48f33Bjorn Bringert 33fde948e69f59589cf0d217ea414af7947de600bbBjorn Bringert /** 34c020c1844b0fb3a825e8a6fa6ad96288bc432fbcBjorn Bringert * Called when a quick contact badge in a suggestion is clicked. 35c020c1844b0fb3a825e8a6fa6ad96288bc432fbcBjorn Bringert * 367010c51b51c97fa43d7b24d2158ecbc1d064e0a6Bjorn Bringert * @param adapter Adapter that contains the clicked suggestion. 377a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood * @param suggestionId The ID of the suggestion clicked. If the suggestion list is flat, this 387a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood * will be the position within the list. 39c020c1844b0fb3a825e8a6fa6ad96288bc432fbcBjorn Bringert */ 407a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood void onSuggestionQuickContactClicked(SuggestionsAdapter<?> adapter, long suggestionId); 41c020c1844b0fb3a825e8a6fa6ad96288bc432fbcBjorn Bringert 42c020c1844b0fb3a825e8a6fa6ad96288bc432fbcBjorn Bringert /** 43fb8ce18922dae59db424fce906b5c113797fe81eBjorn Bringert * Called when the user requests to remove a suggestion from the search history. 44fde948e69f59589cf0d217ea414af7947de600bbBjorn Bringert * 457010c51b51c97fa43d7b24d2158ecbc1d064e0a6Bjorn Bringert * @param adapter Adapter that contains the clicked suggestion. 467a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood * @param suggestionId The ID of the suggestion clicked. If the suggestion list is flat, this 477a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood * will be the position within the list. 48fde948e69f59589cf0d217ea414af7947de600bbBjorn Bringert */ 497a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood void onSuggestionRemoveFromHistoryClicked(SuggestionsAdapter<?> adapter, long suggestionId); 50145693e12b77c193a65b7eaa038a272dd1f48f33Bjorn Bringert 51145693e12b77c193a65b7eaa038a272dd1f48f33Bjorn Bringert /** 52145693e12b77c193a65b7eaa038a272dd1f48f33Bjorn Bringert * Called when the "query refine" button of a suggestion is clicked. 53145693e12b77c193a65b7eaa038a272dd1f48f33Bjorn Bringert * 547010c51b51c97fa43d7b24d2158ecbc1d064e0a6Bjorn Bringert * @param adapter Adapter that contains the clicked suggestion. 557a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood * @param suggestionId The ID of the suggestion clicked. If the suggestion list is flat, this 567a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood * will be the position within the list. 57145693e12b77c193a65b7eaa038a272dd1f48f33Bjorn Bringert */ 587a0c3a7c6fdabce949b59e0a2c6ec1d44a140c24Mathew Inwood void onSuggestionQueryRefineClicked(SuggestionsAdapter<?> adapter, long suggestionId); 59185bb2e3881452c084fde44d9bee657f65881b0eBjorn Bringert} 60