Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Im done wih you "switch"
I have a viewpager and have its on page change listener from it i change some ui stuff like reseting previous page icon and color the new one and set the page title .
Inside of the code i used "switch" to change the stuff depending on the position.
The color did changed but the title stucked at last switch case for every page so i spent hours to find why its doing that ...
The input was ok .
So i just said lets try "if" instead and it worked ._.
Defaq switch ?
Why to use something that has a big chance to fail and theres not much to debug there ?
Whats your comment about it .
Do you ever faced something similar ?
undefined
android
if
java
switch