V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
Registering
V2EX  ›  分享创造

写了一个小小的轮子,微信设置界面中的侧滑按钮

  •  
  •   Registering · 2015-01-03 20:22:27 +08:00 · 2783 次点击
    这是一个创建于 3408 天前的主题,其中的信息可能已经有所发展或是发生改变。
    发现测滑按钮基本是大多 app 中的设置选项的必备,近来开发中用到,所以单独写了一个小工具

    样子如下( opened 单词写错了,暂时不回头改了)






    代码已上传到 github ,欢迎使用。

    不断刷怪升级的 android 菜鸟,不介意您给个 star 哈哈。
    12 条回复    2015-01-06 13:43:02 +08:00
    Pete
        1
    Pete  
       2015-01-03 20:24:56 +08:00 via Android
    不明 没有效果图吗…
    chenglu
        2
    chenglu  
       2015-01-03 20:27:44 +08:00
    po地址。。。
    Registering
        3
    Registering  
    OP
       2015-01-03 20:43:42 +08:00
    Registering
        4
    Registering  
    OP
       2015-01-03 20:45:58 +08:00
    @Livid

    为什么我这个帖子不能APPEND 也不能 EDIT
    chon
        5
    chon  
       2015-01-03 21:29:54 +08:00
    1stlulu
        6
    1stlulu  
       2015-01-03 23:17:16 +08:00


    楼主 grammar mistake
    Registering
        7
    Registering  
    OP
       2015-01-04 09:09:03 +08:00
    @1stlulu


    哈哈,好无情

    我确定opened也是可以的哈
    Registering
        9
    Registering  
    OP
       2015-01-04 23:58:52 +08:00
    @1stlulu

    学霸!
    1stlulu
        10
    1stlulu  
       2015-01-05 01:31:28 +08:00
    @Registering 初高中都会考这种题我现在印象还比较深而已
    ledzep2
        11
    ledzep2  
       2015-01-06 10:57:02 +08:00
    楼主readme里错误需要修正, 如下

    *A button they you can slide to open or close something*
    不要they, 本应是that, 不过也可以省略了. open and close最好换成on and off, 开关都是on和off, 空间之类才是open close. 比如门窗. 动词是turn something on and off

    *About this SlideSwitch*
    不要this, 多余

    *you can initial the state(open or close) in jave code in this way.*
    initial换成initialize, 因为需要的事动词, in this way换成this way, in是多余的.

    *and you can listen the change of the slideswitch like this*
    listen to the changes/events
    Registering
        12
    Registering  
    OP
       2015-01-06 13:43:02 +08:00
    @ledzep2

    thx :)
    哈哈,敲快了,竟然that都写成they了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1239 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:29 · PVG 01:29 · LAX 10:29 · JFK 13:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.