package com.esri.arcgisruntime.sample.maprotation;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.SeekBar;
import android.widget.TextView;

import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.Basemap;
import com.esri.arcgisruntime.mapping.view.MapView;

public class MainActivity extends AppCompatActivity {

    private MapView mMapView;
    private SeekBar mRotationSeekBar;
    private TextView mRotationValueText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // create MapView from layout
        mMapView = (MapView) findViewById(R.id.mapView);
        // create a map with the BasemapType topographic
        ArcGISMap mMap = new ArcGISMap(Basemap.Type.TOPOGRAPHIC, 34.056295, -117.195800, 10);
        // set the map to be displayed in this view
        mMapView.setMap(mMap);
        // create TextView to show angle of rotation
        mRotationValueText = (TextView)findViewById(R.id.rotationValueText);
        // create SeekBar
        mRotationSeekBar = (SeekBar)findViewById(R.id.rotationSeekBar);
        mRotationSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            @Override
            public void onProgressChanged(SeekBar seekBar, int progress, boolean b) {
                // convert progress to double
                double angle = progress;
                // set the text to angle value
                mRotationValueText.setText(String.valueOf(progress));
                // rotate MapView to SeekBar value
                mMapView.setViewpointRotationAsync(progress);
            }

            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {
                
            }

            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {

            }
        });
    }

    @Override
    protected void onPause(){
        super.onPause();
        mMapView.pause();
    }

    @Override
    protected void onResume(){
        super.onResume();
        mMapView.resume();
    }
}

@@ -797,16 +797,17 @@
  Basemap
+.
 Type top
@@ -1397,24 +1397,21 @@
 ar, int 
-progress
+angle
 , boolea
@@ -1490,24 +1490,22 @@
 ble 
-a
+dA
 ngle = 
-progress
+angle
 ;%0A  
@@ -1537,21 +1537,23 @@
 text to 
-angle
+SeekBar
  value%0A 
@@ -1609,24 +1609,21 @@
 valueOf(
-progress
+angle
 ));%0A    
@@ -1651,31 +1651,36 @@
  MapView to 
-SeekBar
+double angle
  value%0A     
@@ -1725,24 +1725,22 @@
 onAsync(
-progress
+dAngle
 );%0A     

update comments, refactor variable names