Use android:adjustViewBounds instead of custom view.