StoresAdapter

open class StoresAdapter @JvmOverloads constructor(context: Context, val resource: Int, var language: String? = null) : ArrayAdapter<AssetAutocompleteResponsePredictionsInner>

You can use this adapter to provide views for an AdapterView. Returns a view for each results returned by StoresService.storeAutocomplete and can be used with list-based user interface widgets such as ListView or Spinner.

By default, the array adapter creates a view by calling AssetAutocompleteResponsePredictionsInner.name on each autocomplete results and places the result in a TextView. You may also customize what type of view is used for the data object in the collection. To customize what type of view is used for the data object, override StoresAdapter.getView and inflate a view resource.

For an example of using an array adapter with a ListView, see the Adapter Views guide.

Constructors

Link copied to clipboard
constructor(context: Context, resource: Int, language: String? = null)

Properties

Link copied to clipboard

The language code, using ISO 639-2 Alpha-2 country codes, indicating in which language the localized name property should be searched , if present, or else the default name property.

Link copied to clipboard

An Android Resource. For example: R.layout.simple_dropdown_item_1line

Functions

Link copied to clipboard
open override fun getFilter(): Filter

Returns a filter that can be used to constrain data with a filtering pattern.

Link copied to clipboard
open override fun getView(position: Int, convertView: View?, parent: ViewGroup): View

Get a View that displays the data at the specified position in the data set.