rewrite in Android Studio