Hello I've created my personal view in android and when I want to get its dimension I get always 0 value, I've found that I should delay this action in my code, I have one question can I do this in this way? I get good dimension
Personalview myView = (Personalview)findViewById(R.id.myView);
myView.postDelayed(new Runnable() {
    @Override
    public void run() {
        Log.i("WIDTH",String.valueOf(myView .getHeight()));
        Log.i("HEIGHT",String.valueOf(myView .height()));
    }
},1000);
 
    