how to convert float to int in android code example Example: android studio float to int int i = Math.round(f); // f a float