google-developer-training/android-advanced

Some "missing" comments and typos

Opened this issue · 0 comments

In https://github.com/google-developer-training/android-advanced/blob/master/SensorListeners/app/src/main/java/com/example/android/sensorlisteners/MainActivity.java

switch (sensorType) {
            // Event came from the light sensor.
            case Sensor.TYPE_LIGHT:
                // Set the light sensor text view to the light sensor string
                // from the resources, with the placeholder filled in.
                mTextSensorLight.setText(getResources().getString(
                    R.string.label_light, currentValue));
                break;
            // Event came from the proximity sensor. <-- this comment is "missing" 
            case Sensor.TYPE_PROXIMITY:
                // Set the proximity sensor text view to the light sensor <-- typo here, should be proximity instead of light
                // string from the resources, with the placeholder filled in.
                mTextSensorProximity.setText(getResources().getString(
                    R.string.label_proximity, currentValue));
                break;
            default:
                // do nothing
        }