Migration to AppCompat and Refactor