my question is i want to change my display image. i have a setting fragment where i can update my information. when i click on my image is showing another activity where i have set of few images. From this activity i want to choose an image and i want to update my display image in my fragment. so basically i am updating my profile picture and displaying it from fragment to activity. i have added images as well would you please have a look. Many thanks in advance thanks


this is my code below on image selection. i can find the solution choosing image from gallery but in my case is differnt and hard to solve my problem as a new in android.
AdapterView.OnItemClickListener myOnItemClickListener = new AdapterView.OnItemClickListener(){
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        int prompt = (int)parent.getItemAtPosition(position);
        Toast.makeText(getApplicationContext(), prompt, Toast.LENGTH_LONG).show();
        finish();
    }};
 
     
    