Coder Social home page Coder Social logo

Comments (1)

pellucide avatar pellucide commented on June 29, 2024

Thats okay. You dont have to change the library code. You can still do the way you want to. The "On" and "Off" are  just a text that gets displayed.  However the state of the switch is not changed. For example,

public void onCheckedChanged(CompoundButton buttonView, boolean isChecked);
will still be invoked with isChecked == false when the switch is on the left position and
                                        isChecked == true when the switch is on the right position.

public boolean isChecked();
will still be return false when the switch is on the left position and
                     true when the switch is on the right position.

Hope this helps


From: kramer65 [email protected]
To: pellucide/Android-Switch-Demo-pre-4.0 [email protected]
Sent: Thursday, October 3, 2013 8:46 AM
Subject: [Android-Switch-Demo-pre-4.0] How to switch on and off (#5)

I just found this repo and I already love it!
I now want to implement the id/pickup3 from the example. I changed the words "Delivery" and "Pickup" to On and Off respectively. Unfortunately I now have the following code:
mySwitch:textOff="On"
mySwitch:textOn="Off"
So I want the button in the left position to be off/false, and the button to the right position to be on/true. Where should I change the code to achieve this?
All tips are welcome!

Reply to this email directly or view it on GitHub.

from android-switch-demo-pre-4.0.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.