Android Open Source - android_wear Main Mobile Activity






From Project

Back to project page android_wear.

License

The source code is released under:

MIT License

If you think the Android project android_wear 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 com.smashedlabs.torchwear;
//w  w w .  j  a  v a2 s . com
import android.app.Activity;
import android.hardware.Camera;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.widget.Button;


public class MainMobileActivity extends Activity {

    private Button mTorchButton;
    private final String TAG = MainMobileActivity.class.getSimpleName().toString();

    @Override
    protected void onStart()
    {
        super.onStart();
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_mobile);

        mTorchButton = (Button) findViewById(R.id.torch_button);
        if(mTorchButton != null)
        {
            mTorchButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {

                }
            });
        }
    }


    @Override
    protected void onDestroy()
    {
        super.onDestroy();
    }
    @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_mobile, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

}




Java Source Code List

com.smashedlabs.torchwear.ApplicationTest.java
com.smashedlabs.torchwear.MainMobileActivity.java
com.smashedlabs.torchwear.MainWearActivity.java
com.smashedlabs.torchwear.TorchService.java