Comments (7)
Can you provide usage example?
from switcher.
<com.bitvale.pacbutton.SwitcherX
android:id="@+id/switcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:switcher_on_color="@color/on"
app:switcher_off_color="@color/off"
app:switcher_icon_color="@color/icon" />
SwitcherX switcher;
switcher = findViewByid(R.id.switcher);
switcher.setChecked(false);
will always show checked true
from switcher.
Thank you for submitting! I found an error in project description page.
Try com.bitvale.switcher.SwitcherX instead of com.bitvale.pacbutton.SwitcherX
from switcher.
@bitvale
That's not the problem. I already use
<com.bitvale.switcher.SwitcherX>
setChecked() doesn't change the state.
also if I set
checked="false"
İt shows reverse disabled and if I pressed there ist a buggy animation from switching false to true
Example
https://i.imgur.com/a/KFNpcuH
from switcher.
Fixed in version 1.0.1 Thank You!
from switcher.
Thank you. The States are right now but the animation is still wrong and same like example before. İf I use
setChecked(false, true )(Withanimation) wrong
setChecked (false,false) everything is fine
from switcher.
Now I can not catch this.
Please try this: open MainActivity
in demo app and replace setOncheckedChangeListener(s)
switcher_x.setOnCheckedChangeListener { checked ->
switcher_c.setChecked(checked) // add this line
if (checked) tv_switcher_x.setTextColor(defaultColor)
else tv_switcher_x.setTextColor(disabledColor)
}
switcher_c.setOnCheckedChangeListener { checked ->
switcher_x.setChecked(checked) // add this line
if (checked) tv_switcher_c.setTextColor(defaultColor)
else tv_switcher_c.setTextColor(disabledColor)
}
Let me know if it doesn't work. For me it works as expected.
from switcher.
Related Issues (17)
- I want a java version HOT 1
- Incorrect state HOT 2
- Switcher not working HOT 2
- I find some bug in Android 4.X (API 19) HOT 1
- Widget not implement android.widget.Checkable; HOT 1
- IllegalArgumentException HOT 1
- Failed to resolve: com.bitvale:switcher:1.1.1 HOT 1
- unable to change the On color and off color programmatically
- Please, how to use it in Java
- How to use switcherX.setOnCheckedChangeListener(); in java HOT 1
- Possibility to make Switcher 3 stage..? HOT 2
- Can't see the shadows
- Could not find class 'com.bitvale.switcher.SwitcherX$SwitchOutline'
- Great Library HOT 3
- the widget's direction wrong in Recyclerview HOT 5
- Hope add is loading HOT 3
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 switcher.