如何使用可绘图将边框添加到Anko editText。
本文How to put a border in an EditText?解释了如何处理XML布局。
在Anko中,您在这个代码片段中添加了什么:
editText() {
hint = "Enter message"
lines = 4
maxLines = 4
singleLine = false
background="@drawable/file" // this is not right
}发布于 2018-04-26 13:27:47
尝尝这个
editText(InputConstraints.PASSWORD) {
id = R.id.saEtPassword
hint = "Password"
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD
singleLine = true
padding = dip(10)
setBackgroundResource(R.drawable.edit_bg)
setHintTextColor(R.color.colorAccent)
}.lparams {
below(R.id.saEtEmail)
width = matchParent
height = wrapContent
}https://stackoverflow.com/questions/50043990
复制相似问题