require "import"
import "android.widget.*"
import "com.androlua.*"
layout=
{
LinearLayout,
orientation=1,
layout_width=1,
layout_height=1,
{LinearLayout,
layout_width=-1,
layout_height=-1,
layout_weight=1,
{
TextView,
text="名称",
layout_width="30%w",
layout_height="10%h",
layout_weight=1,
},
{
EditText,
id="edit",
layout_width="70%w",
layout_height="10%h",
layout_weight=1,
},
},
{LinearLayout,
layout_width=-1,
layout_height=-1,
layout_weight=1,
{
TextView,
text="页数",
layout_width="30%w",
layout_height="10%h",
layout_weight=1,},
{
EditText,
text="20",
id="edit2",
layout_width="70%w",
layout_height="10%h",
layout_weight=1,
InputType="number"
},
},
{LinearLayout,
layout_width=-1,
layout_height=-1,
layout_weight=1,
{
Button,
text="向上查找",
onClick="xscz",
layout_width=-1,
layout_height="10%h",
layout_weight=1,
},
{Button,
text="向下查找",
onClick="xxcz",
layout_width=-1,
layout_height="10%h",
layout_weight=1,},
},
}
dlg=LuaDialog()
.setView(loadlayout(layout))
.show()
function xxcz()
dlg.hide()
service.copy("!@#\n".."*"..edit.text.."*|%向下翻页>"..edit2.text.."$50")
end
function xscz()
dlg.hide()
service.copy("!@#\n".."*"..edit.text.."*|%向上翻页>"..edit2.text.."$50")
end
来自解说社区客户端 |