/* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.contactspicker.ui.components import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.AccountCircle import androidx.compose.material.icons.filled.KeyboardArrowDown import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.FilledTonalButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.android.contactspicker.R private val ACCOUNT_ICON_SIZE = 22.dp private val DROPDOWN_ARROW_SIZE = 20.dp /*TODO(b/430933283): implement profile switching logic. */ @Composable fun ProfileSwitcher() { FilledTonalButton( onClick = { /*TODO(b/430933283): implement profile switching logic. */ }, contentPadding = PaddingValues(start = 16.dp, end = 8.dp), colors = ButtonDefaults.filledTonalButtonColors( containerColor = MaterialTheme.colorScheme.primaryContainer, contentColor = MaterialTheme.colorScheme.primary, ), ) { Icon( imageVector = Icons.Filled.AccountCircle, contentDescription = stringResource(R.string.profile_switcher_content_description), modifier = Modifier.size(ACCOUNT_ICON_SIZE), ) Icon( imageVector = Icons.Filled.KeyboardArrowDown, contentDescription = null, modifier = Modifier.size(DROPDOWN_ARROW_SIZE), ) } }