Android Open Source - CSCI567---Workspace My Static Fragment

From Project

Back to project page CSCI567---Workspace.


The source code is released under:

MIT License

If you think the Android project CSCI567---Workspace 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 csci567.FragmentExample;
/* www. java 2s.c  o m*/
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;

public class MyStaticFragment extends Fragment implements OnClickListener{
  public static final String TAG = "mystaticfrag";
  private Button changefrag;

    public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
  View result = inflater.inflate(R.layout.my_fragment, container, false);
  changefrag = (Button) result.findViewById(;
    // Inflate the layout for this fragment
    return result; 

  public void onClick(View v) {
    int id = v.getId();
    if(id =={
      Intent fragmentmanagerintent = new Intent(getActivity(), Fragmentmanageractivity.class);

Java Source Code List