Today i have stucked in one of the weird problem in Toolbar custom header.
I am using the TextView in the center and ImageView which i
@MikeM. suggestion has worked for me. For more detail on the issue please refer this link click here
What i have done to get rid off from the problem is that I have removed the LinearLayout inside the Toolbar and set the gravity of the view with help of android:layout_gravity, Please refer the below solution for it
And getting the expected result from above code, please check it once.