Learn Custom View's onMeasure by building a PerfectSquare custom view.
Useful resources:
- Learn how to calculate & convert px, dp, dip, sp https://github.com/FAndroidSandbox/customview-onmeasure-learn.git
- onMeasure explanation.. Code also contains explanation from this (PerfectSquare.kt) https://stackoverflow.com/questions/12266899/onmeasure-custom-view-explanation
- Good illustration on how view calculation work https://www.rubicon-world.com/blog/2019/05/creating-custom-views-in-android/