Clip to bounds when becoming visible
Support compilation on SDK5.1