SwitchButton v1.4.5 Release Notes

  • 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

    • ๐Ÿ›  Fix #40

    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!