I have Fragment(F) which calls the activity(A). On press of button(B) in activity(A) the activity must return selected arraylist value back to fragment(F) and finish activity(A)
In your fragment(F) call the startActivityForResult() method to start the activity A, then override onActivityResult() method in the fragment.
So when the activity A finishes you can get get the result bundle in onActivityResult() method.
EDIT
In your fragment onClick() call the activity like this
Intent myIintent=new Intent(getActivity(), AndroidCustomGalleryActivity.class);
startActivityForResult(myIintent, 999);
And in your activity
Intent intent = getIntent();
Bundle bundle = new Bundle();
bundle.putString("key", "value");
intent.putExtras(bundle);
setResult(RESULT_OK, intent);
finish();
Now you will get the result in onActivityResult() method of the fragment.
EDIT2
In your fragment onActivityResult() method you have to get the data like this...
Bundle extras = data.getExtras();
strtext = extras.getString("key");