Converted to Android Studio