I am trying to apply an animation to a view in my Android app after my activity is created. To do this, I need to determine the current size of the view, and then set up an
This works for me in my onClickListener:
onClickListener
yourView.postDelayed(new Runnable() { @Override public void run() { yourView.invalidate(); System.out.println("Height yourView: " + yourView.getHeight()); System.out.println("Width yourView: " + yourView.getWidth()); } }, 1);