Comments (1)
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)
- Improve handling of padding from the track drawables
- Changing the switch thumb size HOT 4
- Dynamically Changing the Track Color HOT 6
- Licensing HOT 1
- What's the function of getCompoundPaddingXXX() functions? HOT 5
- how to change width and height of Switch?
- Drawable gets darkened HOT 2
- Catch Slide Event from Activity HOT 8
- Drawables not showing on higher target SDK's HOT 17
- Scaling & Resizing Issue HOT 16
- Rounding the Corners HOT 1
- MySwitch Padding / Margins HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-switch-demo-pre-4.0.