MainActivity: Optimize custom view