Android Open Source - android-robot-control-app Main Menu Activity






From Project

Back to project page android-robot-control-app.

License

The source code is released under:

GNU General Public License

If you think the Android project android-robot-control-app 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 will.st.bluetooth.robot.controller;
/*w w  w .j a v a  2s.  c o m*/
import will.st.bluetooth.robotcontroller.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class MainMenuActivity extends Activity {

  private static final String TAG = "ROBOT_CONTROLLER";
  
  private ImageButton mGoButton;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d(TAG, "...In MainMenuActivity "
        + "onCreate(Bundle savedInstanceState)...");
    setContentView(R.layout.activity_main_menu);
    mGoButton = (ImageButton) findViewById(R.id.go_button);
    mGoButton.setOnClickListener(new GoButtonListener());
  }

  class GoButtonListener implements OnClickListener {
    public void onClick(View v) {
      Log.d(TAG, "...In GoButtonListener, onClick()...");

      Intent controllerActivityIntent = new Intent(
          getApplicationContext(), ToyMenuActivity.class);

      Log.d(TAG, "In GoButtonListener, onClick(),"
          + " starting ControllerActivity.");
      startActivity(controllerActivityIntent);
    }
  }
}




Java Source Code List

will.st.bluetooth.robot.controller.BtConnectFragment.java
will.st.bluetooth.robot.controller.ConnectionFailedException.java
will.st.bluetooth.robot.controller.ControllerActivity.java
will.st.bluetooth.robot.controller.CrabToyFragment.java
will.st.bluetooth.robot.controller.MainMenuActivity.java
will.st.bluetooth.robot.controller.ToyMenuActivity.java
will.st.bluetooth.robot.controller.TwoWheelToyFragment.java
will.st.bluetooth.robot.controller.controllers.ControllerFragmentFactory.java
will.st.bluetooth.robot.controller.controllers.ControllerFragment.java
will.st.bluetooth.robot.controller.controllers.XControllerFragment.java