I create a bottom navigation view. I try to get height of bottom navigation view. Material design says that the height should be 56dp. I don't want to use hard coded value, because I am not sure that this value won't change. How can I get the dimension of the view programmatically like getting status bar's height.
int resourceId =getResources().getIdentifier("status_bar_height","dimen","android");
if (resourceId > 0) {
height = getResources().getDimensionPixelSize(resourceId);
}