Code example for Fragment

Methods: getActivity

0
    return(result);
  } 
 
  @Override 
  public void onClick(View v) {
    ((DynamicFragmentsDemoActivity)getActivity()).showOther(v);
  } 
   
  @Override 
  public void onAttach(Activity a) {
    super.onAttach(a);
    Log.d(getClass().getSimpleName(), "onAttach()");
  } 
   
  @Override 
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d(getClass().getSimpleName(), "onCreate()");
  } 
   
Stop searching for code, let great code find you!  Add Codota to your java IDE