package android_testsuite;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import android_testsuite.mytest.application_search.AppSearchActivity;
import android_testsuite.mytest.application_search.UidActivity;
import android_testsuite.mytest.camera.CameraActivity;
import android_testsuite.mytest.camera.CameraIntentTestActivity;
import android_testsuite.mytest.custom_loading.CustomLoadingActivity;
import android_testsuite.mytest.media.MediaPlayerTestActivity;
import android_testsuite.mytest.network_test.HttpActivity;
import android_testsuite.mytest.network_test.SocketActivity;
import android_testsuite.mytest.rsa.RsaActivity;
import android_testsuite.mytest.seekbar.SeekBarActivity;

/**
 * @author Ren Hui
 * @since 1.0.1.058
 */
public class GuideActivity extends Activity {

    private Button mBtSelHttp;
    private Button mBtSelSocket;
    private Button mBtSearchApp;
    private Button mBtRSa;
    private Button mBtUid;
    private Button mBtMedia;
    private Button mCameraBt;
    private Button mCustomLoadingBt;
    private Button mCameraNewBtn;
    private Button mSeekBarBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);
        this.mBtSelHttp = (Button) findViewById(R.id.bt_selHttp);
        mBtSelHttp.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(GuideActivity.this, HttpActivity.class);
                GuideActivity.this.startActivity(intent);
            }
        });

        this.mBtSelSocket = (Button) findViewById(R.id.bt_selSocket);
        mBtSelSocket.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(GuideActivity.this, SocketActivity.class);
                GuideActivity.this.startActivity(intent);
            }
        });

        this.mBtSearchApp = (Button) findViewById(R.id.bt_searchApp);
        mBtSearchApp.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(GuideActivity.this, AppSearchActivity.class);
                GuideActivity.this.startActivity(intent);
            }
        });

        this.mBtRSa = (Button) findViewById(R.id.RSA);
        mBtRSa.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(GuideActivity.this, RsaActivity.class);
                GuideActivity.this.startActivity(intent);
            }
        });

        this.mBtUid = (Button) findViewById(R.id.uid);
        mBtUid.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(GuideActivity.this, UidActivity.class);
                GuideActivity.this.startActivity(intent);
            }
        });

        this.mBtMedia = (Button) findViewById(R.id.media);
        mBtMedia.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(GuideActivity.this, MediaPlayerTestActivity.class);
                GuideActivity.this.startActivity(intent);
            }
        });

        this.mCameraBt = (Button) findViewById(R.id.camera_intent);
        mCameraBt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(GuideActivity.this, CameraIntentTestActivity.class);
                GuideActivity.this.startActivity(intent);
            }
        });

        this.mCustomLoadingBt = (Button) findViewById(R.id.custom_loading);
        mCustomLoadingBt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(GuideActivity.this, CustomLoadingActivity.class));
            }
        });

        mCameraNewBtn = (Button) findViewById(R.id.camera);
        mCameraNewBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(GuideActivity.this, CameraActivity.class));
            }
        });

        mSeekBarBtn = (Button) findViewById(R.id.seek_bar);
        mSeekBarBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(GuideActivity.this, SeekBarActivity.class));
            }
        });
    }
}
