[Solved] Android center gravity is not working if container layout is in a scrollview


I got it working after setting the following attribute to my parent ScrollView :

android:fillViewport="true"

solved Android center gravity is not working if container layout is in a scrollview