Android Open Source - android-robot-control-app Crab Toy Fragment






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;
/*from  ww w.j  av a  2s  .co  m*/
import will.st.bluetooth.robotcontroller.R;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class CrabToyFragment extends Fragment {
  int fragVal;
  
  static CrabToyFragment init(int val) {
    CrabToyFragment crabToyFrag = new CrabToyFragment();
    // Supply val input as an argument.
    Bundle args = new Bundle();
    args.putInt("val", val);
    crabToyFrag.setArguments(args);
    return crabToyFrag;
  }

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    fragVal = getArguments() != null ? getArguments().getInt("val") : 1;
  }

  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {
    View layoutView = inflater.inflate(R.layout.fragment_crab_toy, container,
        false);
    return layoutView;
  }
  
  
}




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