mobile/src/main/java/drost_stein/fbg/hsbo/de/urbantrackingapp/StartFragment.java
public void handleDetectedActivity(String typeOfMovement) {
        if (isAdded()) {
            Resources resources = this.getResources();
            ImageView image = (ImageView) getView().findViewById(R.id.activityImage);
            TextView text = (TextView) getView().findViewById(R.id.activityText);
            switch (typeOfMovement) {
                case "IN_VEHICLE":
                    image.setImageResource(R.drawable.ic_directions_car);
                    text.setText(resources.getString(R.string.in_vehicle));
                    break;
                case "ON_BICYCLE":
                    image.setImageResource(R.drawable.ic_directions_bike);
                    text.setText(resources.getString(R.string.on_bicycle));
                    break;
                case "ON_FOOT":
                    image.setImageResource(R.drawable.ic_directions_walk);
                    text.setText(resources.getString(R.string.on_foot));
                    break;
                case "RUNNING":
                    image.setImageResource(R.drawable.ic_directions_run);
                    text.setText(resources.getString(R.string.running));
                    break;
                case "WALKING":
                    image.setImageResource(R.drawable.ic_directions_walk);
                    text.setText(resources.getString(R.string.walking));
                    break;
                case "STILL":
                    image.setImageResource(R.drawable.ic_person);
                    text.setText(resources.getString(R.string.still));
                    break;
                case "TILTING":
                    image.setImageResource(R.drawable.ic_screen_rotation);
                    text.setText(resources.getString(R.string.tilting));
                    break;
                case "UNKNOWN":
                    image.setImageResource(R.drawable.ic_do_not_disturb);
                    text.setText(resources.getString(R.string.unknown));
                    break;
                default:
                    image.setImageResource(R.drawable.ic_do_not_disturb);
                    text.setText(resources.getString(R.string.unknown));
            }
        }
    }
/**
     * sets the image and text on the screen for the type of the detected activty
     *
     * @param typeOfMovement type of the detected activity
     */
sets the image and text on the screen for the type of the detected activty
@param typeOfMovement type of the detected activity
sets the image and text on the screen for the type of the detected activty @param typeOfMovement type of the detected activity
public void handleDetectedActivity(String typeOfMovement) {
        if (isAdded()) {
            Resources resources = this.getResources();
            ImageView image = (ImageView) getView().findViewById(R.id.activityImage);
            TextView text = (TextView) getView().findViewById(R.id.activityText);
            switch (typeOfMovement) {
                case "IN_VEHICLE":
                    image.setImageResource(R.drawable.ic_directions_car);
                    text.setText(resources.getString(R.string.in_vehicle));
                    break;
                case "ON_BICYCLE":
                    image.setImageResource(R.drawable.ic_directions_bike);
                    text.setText(resources.getString(R.string.on_bicycle));
                    break;
                case "ON_FOOT":
                    image.setImageResource(R.drawable.ic_directions_walk);
                    text.setText(resources.getString(R.string.on_foot));
                    break;
                case "RUNNING":
                    image.setImageResource(R.drawable.ic_directions_run);
                    text.setText(resources.getString(R.string.running));
                    break;
                case "WALKING":
                    image.setImageResource(R.drawable.ic_directions_walk);
                    text.setText(resources.getString(R.string.walking));
                    break;
                case "STILL":
                    image.setImageResource(R.drawable.ic_person);
                    text.setText(resources.getString(R.string.still));
                    break;
                case "TILTING":
                    image.setImageResource(R.drawable.ic_screen_rotation);
                    text.setText(resources.getString(R.string.tilting));
                    break;
                case "UNKNOWN":
                    image.setImageResource(R.drawable.ic_do_not_disturb);
                    text.setText(resources.getString(R.string.unknown));
                    break;
                default:
                    image.setImageResource(R.drawable.ic_do_not_disturb);
                    text.setText(resources.getString(R.string.unknown));
            }
        }
    }
public void handleDetectedActivity ( String typeOfMovement ) { if ( isAdded ( ) ) { Resources resources = this . getResources ( ) ; ImageView image = ( ImageView ) getView ( ) . findViewById ( R . id . activityImage ) ; TextView text = ( TextView ) getView ( ) . findViewById ( R . id . activityText ) ; switch ( typeOfMovement ) { case "IN_VEHICLE" : image . setImageResource ( R . drawable . ic_directions_car ) ; text . setText ( resources . getString ( R . string . in_vehicle ) ) ; break ; case "ON_BICYCLE" : image . setImageResource ( R . drawable . ic_directions_bike ) ; text . setText ( resources . getString ( R . string . on_bicycle ) ) ; break ; case "ON_FOOT" : image . setImageResource ( R . drawable . ic_directions_walk ) ; text . setText ( resources . getString ( R . string . on_foot ) ) ; break ; case "RUNNING" : image . setImageResource ( R . drawable . ic_directions_run ) ; text . setText ( resources . getString ( R . string . running ) ) ; break ; case "WALKING" : image . setImageResource ( R . drawable . ic_directions_walk ) ; text . setText ( resources . getString ( R . string . walking ) ) ; break ; case "STILL" : image . setImageResource ( R . drawable . ic_person ) ; text . setText ( resources . getString ( R . string . still ) ) ; break ; case "TILTING" : image . setImageResource ( R . drawable . ic_screen_rotation ) ; text . setText ( resources . getString ( R . string . tilting ) ) ; break ; case "UNKNOWN" : image . setImageResource ( R . drawable . ic_do_not_disturb ) ; text . setText ( resources . getString ( R . string . unknown ) ) ; break ; default : image . setImageResource ( R . drawable . ic_do_not_disturb ) ; text . setText ( resources . getString ( R . string . unknown ) ) ; } } }
sets the image and text on the screen for the type of the detected activty
 @param typeOfMovement type of the detected activity
sets the image and text on the screen for the type of the detected activty @param typeOfMovement type of the detected activity