package metro.net.tehranit;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;


public class NFCActivity extends Activity {

    public Typeface myfont;


    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.nfc);
        myfont = Typeface.createFromAsset(getAssets(), "ARSHIA.TTF");
        ImageView btn1 = (ImageView) findViewById(R.id.btn1);
        ImageView btn2 = (ImageView) findViewById(R.id.btn2);
        ImageView btn3 = (ImageView) findViewById(R.id.btn3);
        TextView txt1 = (TextView) findViewById(R.id.txt1);
        txt1.setTypeface(myfont);
        final ImageView img1 = (ImageView) findViewById(R.id.img1);
        img1.post(new Runnable() {

            @Override
            public void run() {
                // TODO Auto-generated method stub
                ((AnimationDrawable) img1.getBackground()).start();

            }
        });

        btn1.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                Intent myintent = new Intent(NFCActivity.this, QRActivity.class);
                NFCActivity.this.startActivity(myintent);
            }
        });
        btn2.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                Toast.makeText(NFCActivity.this, "در همین صفحه قرار دارید !!!", Toast.LENGTH_SHORT).show();
            }
        });
        btn3.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                Intent myintent2 = new Intent(NFCActivity.this, PAYMENTActivity.class);
                NFCActivity.this.startActivity(myintent2);
            }
        });
    }
}