Code example for Fragment

Methods: getArgumentsonStart

0
    } 
	 
	/*get values from intent*/ 
	@Override 
    public void onStart() { 
        super.onStart(); 
    Bundle args = getArguments();
        if (args != null) {
            updateArticleView(args.getInt(ARG_POSITION));
        } else if (mCurrentPosition != -1) {
            updateArticleView(mCurrentPosition);
        } 
    } 
	/*This is used when article updated*/ 
	public void updateArticleView(int position) {
		TextView article = (TextView) getActivity().findViewById(R.id.tablet);
		 
		mCurrentPosition = position;
		} 
	 
Connect your IDE to all the code out there  Get Codota for Java