remove custom gravity to use android:gravity
revert code to 1.6