Android Open Source - voc Guide Activity






From Project

Back to project page voc.

License

The source code is released under:

GNU General Public License

If you think the Android project voc listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package userinterface;
//from w ww .j  a va2s  . c o  m
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import net.bluetoothviewer.R;
import transmission.thirdlib.capture.CaptureActivity;

/**
 * Created with IntelliJ IDEA.
 * User: linyaoli
 * Date: 11/26/13
 * Time: 2:15 PM
 * To change this template use File | Settings | File Templates.
 */
public class GuideActivity extends Activity {

    private static CheckBox checkBoxCartridge ;
    private static CheckBox checkBoxQR ;
    private static CheckBox checkBoxConfig ;
    private static Button buttonStart;

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        //if (requestCode == 0)
    }

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.guide);
        checkBoxCartridge = (CheckBox)findViewById(R.id.checkBox);
        checkBoxQR = (CheckBox)findViewById(R.id.checkBox1);
        checkBoxConfig = (CheckBox)findViewById(R.id.checkBox2);

        checkBoxCartridge.setEnabled(false);
        checkBoxQR.setEnabled(false);
        checkBoxConfig.setEnabled(false);

        buttonStart = (Button)findViewById(R.id.button_startguide);
        buttonStart.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //To change body of implemented methods use File | Settings | File Templates.

                new AlertDialog.Builder(GuideActivity.this)
                        .setTitle("VOC Monitor")
                        .setMessage("Check the cartridge.")
                        .setCancelable(false)
                        .setNeutralButton("Confirm", new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialogInterface, int i) {
                                //To change body of implemented methods use File | Settings | File Templates.
                                checkBoxCartridge.setEnabled(true);
                                checkBoxCartridge.setChecked(true);

                                buttonStart.setText("Scan QR");
                                buttonStart.setOnClickListener(new View.OnClickListener() {
                                    @Override
                                    public void onClick(View view) {
                                        //To change body of implemented methods use File | Settings | File Templates.
                                        new AlertDialog.Builder(GuideActivity.this)
                                                .setTitle("VOC Monitor")
                                                .setMessage("Scan the QR code of calibration factor.")
                                                .setCancelable(true)
                                                .setNeutralButton("Scan",
                                                        new DialogInterface.OnClickListener() {
                                                            //@Override
                                                            public void onClick(DialogInterface dialogInterface, int i) {
                                                                //To change body of implemented methods use File | Settings | File Templates.
                                                                try {
                                                                    Intent myIntent = new Intent(
                                                                            getApplicationContext(),
                                                                            CaptureActivity.class);
                                                                    myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                                                                    startActivityForResult(
                                                                            myIntent, 13);
                                                                    //13);
                                                                } catch (Exception e) {
                                                                    e.printStackTrace();
                                                                }
                                                                checkBoxQR.setEnabled(true);
                                                                checkBoxQR.setChecked(true);

                                                                buttonStart.setText("Config");
                                                                buttonStart.setOnClickListener(new View.OnClickListener() {
                                                                    @Override
                                                                    public void onClick(View view) {
                                                                        //To change body of implemented methods use File | Settings | File Templates.
                                                                        Intent intent_main = new Intent(getBaseContext(),
                                                                                ConfigActivity.class);
                                                                        startActivityForResult(intent_main, 0);
                                                                    }
                                                                });

                                                            }
                                                        })
                                                .show();

                                    }
                                });

                            }
                        })
                        .show();


            }
        });

    }
}




Java Source Code List

cleanup.DrawGraph.java
cleanup.Instructions.java
cleanup.PositionService.java
cleanup.QRcodeFromFile.java
cleanup.QRcodeParse.java
cleanup.SaveQRFile.java
display.DynamicPlotDataSource.java
display.DynamicPlotSeries.java
processing.LinearRegression.java
processing.SensorCurve.java
transmission.BluetoothChatService.java
transmission.LocalProfile.java
transmission.thirdlib.capture.CaptureActivityHandler.java
transmission.thirdlib.capture.CaptureActivity.java
transmission.thirdlib.capture.DecodeFormatManager.java
transmission.thirdlib.capture.DecodeHandler.java
transmission.thirdlib.capture.DecodeThread.java
transmission.thirdlib.capture.FinishListener.java
transmission.thirdlib.capture.InactivityTimer.java
transmission.thirdlib.capture.IntentSource.java
transmission.thirdlib.capture.Intents.java
transmission.thirdlib.capture.PlanarYUVLuminanceSource.java
transmission.thirdlib.capture.PreferencesActivity.java
transmission.thirdlib.capture.ViewfinderResultPointCallback.java
transmission.thirdlib.capture.ViewfinderView.java
transmission.thirdlib.manager.AutoFocusCallback.java
transmission.thirdlib.manager.CameraConfigurationManager.java
transmission.thirdlib.manager.CameraManager.java
transmission.thirdlib.manager.PreviewCallback.java
userinterface.BluetoothViewer.java
userinterface.ConfigActivity.java
userinterface.DeviceListActivity.java
userinterface.GuideActivity.java
userinterface.HistoryActivity.java
userinterface.SlidingDrawerActivity.java
userinterface.Welcome.java