Merge pull request #5 from ecsoftware/sprint0

Design View

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <ImageView
        android:id="@+id/img"
        android:scaleType="centerCrop"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:contentDescription="@string/img_alt"
        android:src="@drawable/direction_board" />

</LinearLayout>


Source Code : 

package com.ecsoft;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.ImageView;
import android.widget.Toast;

public class LaunchActivity extends Activity implements OnClickListener {

	ImageView img;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_launch);
		initialize();

		img.setOnTouchListener(new OnTouchListener() {

			@Override
			public boolean onTouch(View v, MotionEvent event) {

				// int action = event.getAction();
				int x = (int) event.getX();
				int y = (int) event.getY();
				Log.d("x", x + "");
				Log.d("y", y + "");
				if ((x >= 150 && x <= 254) && (y >= 545 && y <= 565)) {
					Toast.makeText(getApplicationContext(), "WOW...",
							Toast.LENGTH_SHORT).show();
				}

				return true;
			}
		});

	}

	private void initialize() {
		img = (ImageView) findViewById(R.id.img);
		img.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.launch, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.img:
			int[] values = new int[2];
			v.getLocationOnScreen(values);
			Log.d("X & Y", values[0] + " " + values[1]);

			break;
		}
	}

}