All Versions
3
Latest Version
Avg Release Cycle
-
Latest Release
-

Changelog History

  • v2.0.0

    ENG

    1. Re-clarify the meaning of some params. ⚡️ 2. Update the measurement of SwitchButton and the logic becomes more clear, especially the text part. 👍 3. Support config SwitchButton's size by setting a exact width and height. There are now TWO mainly method to control it's size.

    CHN

    1. 重新明确了参数的含义。
    2. 更新了SwitchButton的测量机制,逻辑更加清晰;尤其是文字部分。
    3. 支持设置确定的宽高,来确定SwitchButton的View大小。现在有两种方式可以控制SwitchButton的大小了。
  • v1.4.6

    • 🛠 Fixed #89 .
  • v1.4.5

    1.4.4

    • 🛠 Fixed #65.
    • ⚡️ Update text layout, tests looks like center.

    1.4.3

    • 🛠 Fixed #64. Respect to clickable and focusable attributes.

    1.4.2

    • Support #49. By default SwitchButton found accentColor of your theme for tintColor. (accentColor is used for controls according to Material Design guideline. )

    1.4.1

    • 🛠 fixed #49.
    • 👌 Support operation without onCheckedChanged callback.

    1.4.0

    • Add text feature. You can set text for either checked or unchecked status with kswTextOn and kswTextOff attrs. And you can set the margin of text in horizontal direction using kswTextMarginH attr.
    • For additional, you can set small icons now by using SpannableString with setText() method in code.
    • Thanks @lpmfilho

    1.3.4


    1.3.3

    • 🛠 Fix SwitchButtonMD style bug in RecyclerView and add page for test. Fix bug in setCheckedImmediately() in onCheckedChanged() method. *(setChecked in onChecked)**

    1.3.2

    • setClickable(boolean) support.
      • Bug fix.

    1.3.1

    • ✂ Remove shadow of MD style to support under 5.0.

    1.3.0

    • Reconstructe the whole library.
      • More convenient customization way by tintColor.
      • New design demo. All APIs in ONE. *Fix issue #23 #25 #26 *Just exciting!!!

    1.2.10

    • 🛠 Fix issue #22 by change the attributes' name to prevent conflict;

    1.2.9

    • 🛠 Fix issue #19.

    1.2.8

    • 🛠 Fix stretch bug while using higher API. *Add Gradle support. *Built in Android Studio.

    1.2.7

    • 🛠 Fix rendering bug on some devices. *Fix states bug.

    1.2.6

    • With calling the method setChecked(boolean, false);, you can change the status without invoking the listener.

    1.2.5

    • 🛠 Fix shrink bug in Android 5.0 (the problem is same like it is in Android 4.4, which has been fixed in 1.2.4). *More available to setup Material Design style SwitchButton using @style/MD in xml layout. *Fix Demo Project bug

    1.2.4

    • fix shrink bug(that will cause the content out of bounds not disapper, on Android 4.4)
    • upload .pad resource, whitch I forgot to upload before.(My fault.)

    1.2.3

    • bug fix
    • ⬆️ upgrade demo apk
    • more clear way to use

    Since the animation ran on sub thread, "toggle" and "setChecked" methods may mot execute as you wish what cause the checked status change immediately.

    This problem may be solved, but I declared 2 methods to deal with the situation whether you want it happen immediately.

    If you want to set the checked status immediately, just call setChecked(boolean checked); method like CheckBox. And slideToChecked(boolean checked); method for slow one with slide animation.

    When toggle, call toggle(); with change the status immediately and toggle(false); for slow one.

    easy_to_use


    1.2

    (11/08/2014)

    • ➕ Add StateList support for all resources and enable/disable, pressed has been tested in Demo.
    • New Style with Material Design, preview below.
    • ➕ Add "shrink" feature. This makes you can draw your image resources out size the view bounds, in the other word, shrink the size of view and make the experience stay the same.

    🆕 New Style with Material Design:

    💅 materialdesign_style

    To use shrink feature, you can easily add these attributes in your xml file. It is recommended that set these values positive.

    • insetLeft: left size for shrinking
    • insetRight: right size for shrinking
    • insetTop: top size for shrinking
    • insetBottom: bottom size for shrinking

    1.1

    (10/08/2014)

    • 🛠 Fix lots of bugs.
    • 💅 Change the default style
    • ➕ Add iOS7 style, you can just use like how the demo did
    • ⚡️ Update demo, it becomes more convenient, effective and beautiful
    • ➕ Add new attribute: measureFactor, you can custom the factor between width and height now. It is convenient to config the rest space of background. Learn more in the demo.
    • 💅 Update the logic of thumbMargin, it can work well with negative margins now (iOS style just using this trick).

    🆕 new default style and demo apk looks like this:

    💅 default_style

    demo_preview


    1.0

    ➕ Add an attr of radius, now you can change the radius when configure the button's face!