| | |
| | | fun showInputDialog( |
| | | title : String = "" , message : String = "" , hint : String = "",regex : String = "", |
| | | confirmText:String = "确定", cancelText:String = "取消", |
| | | maxLines:Int = 1, minLength:Int = 0, maxLength:Int = 0, |
| | | maxLines:Int = 0, minLength:Int = 0, maxLength:Int = 0, |
| | | inputType : KeyboardType = KeyboardType.Text , |
| | | touchOutside : Boolean = true , //空白和系统返回 是否关闭 |
| | | showClose : Boolean = false , //显示关闭图标(默认不显示) |
| | |
| | | } , text = { |
| | | TextField(value = text , onValueChange = { //val pattern = """(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]""".toRegex() |
| | | text = it; |
| | | } , singleLine = message.maxLines == 1 , maxLines = message.maxLines, modifier = modifier , keyboardOptions = KeyboardOptions(keyboardType = keyboardType) , placeholder = { |
| | | } , singleLine = message.maxLines == 1 , maxLines = if(message.maxLines < 1) Int.MAX_VALUE else message.maxLines, modifier = modifier , keyboardOptions = KeyboardOptions(keyboardType = keyboardType) , placeholder = { |
| | | Text(text = message.hint , fontSize = 14.sp) |
| | | } , textStyle = TextStyle(fontSize = 14.sp , color = Color.Black)) |
| | | }) |