Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch:两端不一致总结 #90

Open
zhangxin-it opened this issue Dec 24, 2019 · 1 comment
Open

Switch:两端不一致总结 #90

zhangxin-it opened this issue Dec 24, 2019 · 1 comment
Assignees
Labels
Inconsistent Android、iOS两端不一致 p1

Comments

@zhangxin-it
Copy link
Contributor

zhangxin-it commented Dec 24, 2019

  1. ios端能为switch设置背景色,android则设置背景色无效;
  2. 开关打开后,小球和选中背景色两端不一致;
  3. setThumbColor、setNormalColor、setSelectedColor这三个方法两端都设置无效;

demo:

switch = Switch()
switch:width(100):height(80):marginLeft(100):marginTop(100)
switch:bgColor(Color(223, 213, 12, 1))
switch:on(true)
switch:setThumbColor(Color(255,0,0,1)) --设置圆点颜色
switch:setNormalColor(Color(0,0,255,1)) --设置未选中主题色
switch:setSelectedColor(Color(255,255,0,1)) --设置选中主题色

switch:setSwitchChangedCallback(function(isOn)
    print("switch changed -----", isOn)
    print("switch ----- ", switch:on())
end)

window:addView(switch)  
@xuwhale6 xuwhale6 added the Inconsistent Android、iOS两端不一致 label Dec 30, 2019
@dingpuyu dingpuyu added the p1 label Feb 3, 2020
@dingpuyu
Copy link
Contributor

dingpuyu commented Feb 3, 2020

待同步Lua版Switch控件,到MLN_ToolKit仓库,使用lua版定制化较好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inconsistent Android、iOS两端不一致 p1
Projects
None yet
Development

No branches or pull requests

6 participants