Make adding contact more user-friendly with autocaps and phone number keyboard.
This commit is contained in:
parent
3cd3f3eba1
commit
890e50a2c9
@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Text
|
||||
@ -11,6 +12,9 @@ import androidx.compose.material3.TextField
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.input.KeyboardCapitalization
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.style.TextGeometricTransform
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
@Composable
|
||||
@ -35,7 +39,8 @@ fun AddContactDialog(
|
||||
},
|
||||
placeholder = {
|
||||
Text(text = "First Name")
|
||||
}
|
||||
},
|
||||
keyboardOptions = KeyboardOptions(capitalization = KeyboardCapitalization.Words)
|
||||
)
|
||||
TextField(
|
||||
value = state.lastName,
|
||||
@ -44,7 +49,8 @@ fun AddContactDialog(
|
||||
},
|
||||
placeholder = {
|
||||
Text(text = "Last Name")
|
||||
}
|
||||
},
|
||||
keyboardOptions = KeyboardOptions(capitalization = KeyboardCapitalization.Words)
|
||||
)
|
||||
TextField(
|
||||
value = state.phoneNumber,
|
||||
@ -53,7 +59,8 @@ fun AddContactDialog(
|
||||
},
|
||||
placeholder = {
|
||||
Text(text = "Phone Number")
|
||||
}
|
||||
},
|
||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Phone)
|
||||
)
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user