CountryPickerLayout

data class CountryPickerLayout(val presentation: PickerPresentation = PickerPresentation.Adaptive, val listStyle: CountryListStyle = CountryListStyle.InsetGrouped, val flagStyle: CountryFlagStyle = CountryFlagStyle.Tile, val flagSource: CountryFlagSource = CountryFlagSource.FlagCdn(), val selectionIndicator: SelectionIndicator = SelectionIndicator.Check, val headerStyle: SheetHeaderStyle = SheetHeaderStyle.Large, val quickPicks: QuickPicksStyle = QuickPicksStyle.Carousel, val showRegionFilters: Boolean = true, val showRegionCounts: Boolean = true, val showDialCode: Boolean = true, val showIsoCode: Boolean = false, val showRegionName: Boolean = false, val showDividers: Boolean = true, val showAlphabetIndex: Boolean = true, val showResultCount: Boolean = true, val highlightSearchMatches: Boolean = true, val showSearchSuggestions: Boolean = true, val sheetHeightFraction: Float = 0.92f, val dialogMaxWidth: Dp = 560.dp, val dialogMaxHeight: Dp = 760.dp, val wideScreenBreakpoint: Dp = 600.dp)(source)

Structural choices — the parts of the design that are about arrangement rather than color or size.

Behaviour (which countries, single or multiple selection, limits) lives in com.ezzy.ccp.countrypicker.state.CountryPickerConfig; everything about how the picker looks is here and in the rest of CountryPickerStyle.

Constructors

Link copied to clipboard
constructor(presentation: PickerPresentation = PickerPresentation.Adaptive, listStyle: CountryListStyle = CountryListStyle.InsetGrouped, flagStyle: CountryFlagStyle = CountryFlagStyle.Tile, flagSource: CountryFlagSource = CountryFlagSource.FlagCdn(), selectionIndicator: SelectionIndicator = SelectionIndicator.Check, headerStyle: SheetHeaderStyle = SheetHeaderStyle.Large, quickPicks: QuickPicksStyle = QuickPicksStyle.Carousel, showRegionFilters: Boolean = true, showRegionCounts: Boolean = true, showDialCode: Boolean = true, showIsoCode: Boolean = false, showRegionName: Boolean = false, showDividers: Boolean = true, showAlphabetIndex: Boolean = true, showResultCount: Boolean = true, highlightSearchMatches: Boolean = true, showSearchSuggestions: Boolean = true, sheetHeightFraction: Float = 0.92f, dialogMaxWidth: Dp = 560.dp, dialogMaxHeight: Dp = 760.dp, wideScreenBreakpoint: Dp = 600.dp)

Properties

Link copied to clipboard

Height cap of the dialog presentation.

Link copied to clipboard

Width cap of the dialog presentation.

Link copied to clipboard

Where flag artwork comes from: flagcdn.com images in one of three shapes, or the platform's emoji. See CountryFlagSource.

Link copied to clipboard

How flags are framed everywhere — tile, circle, rounded or bare.

Link copied to clipboard

Large or compact sheet title.

Link copied to clipboard

Emphasis on the part of a name that matched the query.

Link copied to clipboard

Grouped, plain or card rows.

Link copied to clipboard

Sheet, dialog, or adaptive.

Link copied to clipboard

How recent, suggested and detected countries are surfaced.

Link copied to clipboard

Check, radio or none, for single selection.

Link copied to clipboard

Height of a non-full-screen sheet, as a fraction of the window.

Link copied to clipboard

The scrubbable A–Z rail beside the full list.

Link copied to clipboard

Dial codes trailing each row.

Link copied to clipboard

Hairlines between rows.

Link copied to clipboard

ISO codes in each row's secondary line.

Link copied to clipboard

The number of countries on each region filter.

Link copied to clipboard

The sliding region filter under the search field.

Link copied to clipboard

Region names in each row's secondary line.

Link copied to clipboard

The result count while searching.

Link copied to clipboard

"Did you mean …" suggestions when a search finds nothing.

Link copied to clipboard

Window width at which PickerPresentation.Adaptive switches to a dialog.