Skip to content Skip to sidebar Skip to footer

Android - Keyboard Won't Appear For Edittext After Animation Happens

I have seen questions/solutions here for the keyboard not showing up, but none relating to my specific issue. When you click an EditText, the keyboard shows up fine. But, when I an

Solution 1:

So it seems that when you have the visibility set to INVISIBLE on the EditText fields it doesn't want to get focus.

I fixed this issue by changing the visibility on those fields after the animation completes like this:

animFadeIn.setAnimationListener(newAnimationListener() {
    @OverridepublicvoidonAnimationEnd(Animation animation) {
        emailField.setVisibility(View.VISIBLE);
        passwordField.setVisibility(View.VISIBLE);
        logInText.setVisibility(View.VISIBLE);
        loginButton.setVisibility(View.VISIBLE);
        signupButton.setVisibility(View.VISIBLE);
    }

    @OverridepublicvoidonAnimationStart(Animation animation) {}

    @OverridepublicvoidonAnimationRepeat(Animation animation) {}

});

Hope this helps you :)

Solution 2:

Had the same problem. Just don't use fillAfter, it's crap. Combine with @Wextux's solution.

Solution 3:

There are different types of Animations, You are using the wrong type of animation! You want to use ObjectAnimator.

Post a Comment for "Android - Keyboard Won't Appear For Edittext After Animation Happens"