Code example for Fragment

import android.widget.TextView; 
 * Stub class that can be used for testing support-lib fragments. 
public class CustomFragment extends Fragment {
  private TextView textView;
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    textView = new TextView(inflater.getContext());
    textView.setText("CustomFragment text view");
    return textView;
Stop searching for code, let great code find you!  Add Codota to your java IDE