New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
labels showing unexpectedly #20
Comments
I don't see anything that should be causing the inconsistent behavior. Do you see the same issue on other devices or with fewer instances of the FloatLabel? |
I'm using FloatLabel all over the place and it only happens here on this If I remove the id from the two labels acting up the issue goes away. Also
|
Definitely a strange issue. I wonder if the build tools didn't properly update the ID references? |
Nope I have confirmed that isn't the reason. Switching the id back and the issue resurfaced. Looks like it is caused by a matching ID in a different Transition Scene hosted in the activity but not visible at the same time. |
I'm having difficulty reproducing this. I've tried with two scenes. Each scene had two FloatLabels (R.id.name and R.id.color). In the first scene I included text in the color FloatLabel but not the name. I did the opposite in the second scene. Toggling between the scenes works correctly with labels showing how they should (though the invisible labels temporarily appear before fading out). Changing either field manually and changing scenes also seems to work. Any idea what else is different? |
I am using this Transitions Everywhere library https://github.com/andkulikov/transitions-everywhere I will try to rip out the business stuff and upload an example. |
Thanks, I appreciate it! |
Okay here is a zip with a project that reproduces the issue. Just open the app and press the 'Add Payment Method' button. Issue happens 100% of the time on my GS5 running lollipop. I haven't had a chance to test other devices. https://drive.google.com/file/d/0B9BQRk_YVoNrdDVqVVduY3dnY0k/view?usp=sharing Note, the two fields that have this issue share an ID with an ViewHolder items in the RecyclerView on the first scene. |
Thanks for the code sample. I've pulled it down and can confirm I'm seeing the issue. I'll see if I can track it down now. |
Looks like it's something with the way the Transitions Everywhere library is setting up the views. I further cut down the code to just a few views and the built in Scene handling works fine in Android (tested on 5.0), but the library shows the hint and label at the same time. I'll dig in some more and see if I can figure out what the difference is between how the library is working and how the native code works. |
So are you saying that using the framework transition api (just changing the package name) actually resolves the issue as well? If that is the case I would be inclined to open a bug there as well. |
Yeah, if you switch to android.transition.TransitionManager and android.transition.Scene, it works fine. From what I can tell, the TransitionsEverywhere API is not respecting the alpha value of the label. I can see mLabel.setAlpha(0) getting called in the FloatLabel.init() method, so the label shouldn't show, but the TransitionsEverywhere library is resetting it to 1.0. |
This is great info. I'll pass this along. Sounds like this bug is invalid
|
Thanks, I'll close this one out. |
Hello thanks for the cool library. I am having an issue though. Sometimes the float label shows itself by default when the edit text is empty. There doesn't seem to be any rhyme or reason to it. Sometimes it shows and sometimes it doesn't.
Here is snapshot of the xml file I'm using and a screenshot. As you can see sometimes the label shows and sometimes it doesn't. The only difference I see between the views in the xml file is the input type but setting them all to the same thing has no effect. Any idea whats going on?
The text was updated successfully, but these errors were encountered: