Skip to content

EditTextViewDemo.llua

xu.jingyu edited this page Aug 11, 2020 · 2 revisions

copy下面代码,运行试试

BLUE = Color(80, 80, 255, 1)
RED = Color(255, 80, 80, 1)
YELLOW = Color(255, 255, 80, 1)

defEditText() {
    EditTextView()
    .width(200)
    .height(50)
    .bgColor(BLUE)
    .padding(10, 10, 10, 10)
    .marginBottom(5)
}
---
--- UI
ui {
    defEditText()
    --.text("ahhhh")
    .placeholder("请输入")
    .placeholderColor(YELLOW)
    .textColor(RED)
    .returnMode(ReturnType.Search)
    .inputMode(EditTextViewInputMode.Number)
    .singleLine(true)
    .passwordMode(true)
}

---
--- preview
function preview()

end
Clone this wiki locally