Code example for ListFragment

Methods: getActivity, onActivityResult, startActivity

0
 
        // Response from Edit Product Activity 
        @Override 
		public void onActivityResult(int requestCode, int resultCode, Intent data) {
        	System.out.println("Starter onActivityResult");
                super.onActivityResult(requestCode, resultCode, data);
 
                if (resultCode == 100) {
 
                        Intent intent = getActivity().getIntent();
                        getActivity().finish();
                        startActivity(intent);
                } 
 
        } 
         
        private boolean haveNetworkConnection() { 
    	    boolean haveConnectedWifi = false;
    	    boolean haveConnectedMobile = false;
 
    	    ConnectivityManager cm = (ConnectivityManager) getActivity().getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);