Renamed MainActivity.java to TipCalculator.java. Renamed activity_main.xml to activity_tip_calculator.xml. Replaced hardcoded strings in views with string resources. Removed onclick handler duplication. Added check for invalid input.