Skip to content
Snippets Groups Projects
Commit 78a85847 authored by Charlotte Lu's avatar Charlotte Lu Committed by Android (Google) Code Review
Browse files

Merge "Add SettingsTextFieldPassword enable." into main

parents 3528aa3d 7372cf98
No related branches found
No related tags found
No related merge requests found
......@@ -29,8 +29,8 @@ import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
......@@ -46,6 +46,7 @@ import com.android.settingslib.spa.framework.theme.SettingsTheme
fun SettingsTextFieldPassword(
value: String,
label: String,
enabled: Boolean = true,
onTextChange: (String) -> Unit,
) {
var visibility by remember { mutableStateOf(false) }
......@@ -60,6 +61,7 @@ fun SettingsTextFieldPassword(
keyboardType = KeyboardType.Password,
imeAction = ImeAction.Send
),
enabled = enabled,
trailingIcon = {
Icon(
imageVector = if (visibility) Icons.Outlined.VisibilityOff
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment