Merge pull request #5 from ecsoftware/sprint0

From prabhu; email: prabhu0023@gmail.com
------------------------------------------------------------
<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >


    <ImageButton
        android:id="@+id/directionBoasrdImage"
        android:layout_width="400dp"
        android:layout_height="250dp"
        android:background="#ff0"/>

    <ProgressBar
        android:id="@+id/progressBarContact"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:layout_alignTop="@+id/image" />

</RelativeLayout>
-----------------------------------
package com.easy;
 

import com.androidquery.AQuery; 
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap; 
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View; 
import android.view.View.OnTouchListener;
import android.widget.ImageButton;
import android.widget.ProgressBar;
import android.widget.Toast;

public class MainActivity extends Activity {
	Context context;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		context = this;
		ImageButton directionBoasrdImage = (ImageButton) findViewById(R.id.directionBoasrdImage);
		ProgressBar progressBarContact = (ProgressBar) findViewById(R.id.progressBarContact);
		String imgUrl = "https://raw.githubusercontent.com/ecsoftware/directionboard/master/direction_board.jpg";
		AQuery aq = new AQuery(context);
		Bitmap preset = aq.getCachedImage(imgUrl);
		if(preset==null)
			aq.id(directionBoasrdImage).progress(progressBarContact)
			.image(imgUrl,true,true,50,directionBoasrdImage.getId(),preset,AQuery.FADE_IN);
		else
			aq.id(directionBoasrdImage).image(preset);
		progressBarContact.setVisibility(View.GONE);
		directionBoasrdImage.setOnTouchListener(new OnTouchListener() {
			
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				// TODO Auto-generated method stub
				float xAxisValue = event.getX();
				float yAxisValue = event.getY();
				if(xAxisValue >= 280.00 && xAxisValue <= 400.00 && yAxisValue >=370.00 && yAxisValue <=390.00  ){ 

					Log.i("prabhu", "get position "+xAxisValue+":"+yAxisValue);
					Toast toast = Toast.makeText(context,"WOW", Toast.LENGTH_SHORT);
					toast.setGravity(Gravity.CENTER, 0, 0);
					toast.show();
				} 
				return true;
			}
		});
	
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}