Code example for Fragment

Methods: getActivity

1
 
public class DefaultGameExtrasFragment extends Fragment {
 
    @Override 
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        TextView tv = new TextView(this.getActivity());
        tv.setText("Implement me!");
        return tv;
    } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE