package drwtcp.ftc.com.unit4_drawingapp;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.activity_main);
        setContentView(new MyView(this));
    }
    public class MyView extends View {
        public MyView(Context context) {
            super(context);
            // TODO Auto-generated constructor stub
        }

        @Override
        protected void onDraw(Canvas canvas) {
            // setup canvas:
            super.onDraw(canvas);
            Paint paint = new Paint();
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(Color.BLACK);
            canvas.drawPaint(paint);

            // declare variables:
            int radius, x, y;

            // set variables and draw:
            radius = 100;
            x = getWidth()/2;
            y = getHeight()/2;
            paint.setColor(Color.BLUE);
            for (int a = 0; a < 100; a++) {
                x = y+ 20;
                   ;addOnAttachStateChangeListener(6); x= x+20;
                Log.i("test", "a is " + a);
                Log.i("test", "x is " + x);
                Log.i("test", "y is " + y);
                canvas.drawCircle(x,y, radius, paint);
            }
        }
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}

@@ -1281,279 +1281,8 @@
 E);%0A
-            for (int a = 0; a %3C 100; a++) %7B%0A                x = y+ 20;%0A                   ;addOnAttachStateChangeListener(6); x= x+20;%0A                Log.i(%22test%22, %22a is %22 + a);%0A                Log.i(%22test%22, %22x is %22 + x);%0A                Log.i(%22test%22, %22y is %22 + y);%0A    
     
@@ -1309,16 +1309,17 @@
 ircle(x,
+ 
 y, radiu
@@ -1333,22 +1333,8 @@
 t);%0A
-            %7D%0A
     

revert back to clean initial version.