In my app I'm using the Android Activity Slide transition. I followed a nice tutorial and everything works as expected except for the hint of my EditText
, which is contained within an InputTextLayout
:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/activity_vertical_margin">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="Your name"/>
</android.support.design.widget.TextInputLayout>
All the components are nicely animated, but the hint just pops up before the animation starts and remains in the final position. Do I have to add some extra code to tell the framework to animate the hint, too?
According to the Android developer documentation it should work (or at least it's not unsupported).
I'm using version 22.2 of the Support Design Library.
It would be great if someone could point me in the right direction.
Try this solution, it works for me:
When you have >1 TextInputLayouts, put TextInputLayouts into a container
inputTextPanel : LinearLayout
TextInputLayout
login : EditText
TextInputLayout
password : EditText
and in onCreateView:
setContentView(R.layout.login_layout)
configuration(fromSdk = 21) {
inputTextPanel.isTransitionGroup = true
}
If you have only one, you can just
myTextInputLayout.isTransitionGroup = true
This is a bug. I have been looking for a fix. The workaround i have used is to set hint of edittext as empty before animation and set edittext hint after animation completes. But i dont know if thats what you would like to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With