TextInputLayout.setError() leaves empty space after clearing the error

前端 未结 10 1544
囚心锁ツ
囚心锁ツ 2020-12-08 09:24

I recently used TextInputLayout and it\'s setError() method. The problem I\'m getting is, when I clear the error by calling setError(null)

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 09:38

    Then you should override it like so:

    @Override
    public void onAnimationEnd(View view)
    {
        view.setVisibility(GONE); // <-- this is where you make it GONE
    
        updateLabelVisibility(true); 
    }
    

    Or try this i.e. on a button or whatever you are using:

    final Button btn = (Button) findViewById(R.id.btn);
    btn.setVisibility(View.GONE); //<--- makes the button gone
    

提交回复
热议问题