I want the activity to refresh/redraw after dialog fragment is dismissed.. How can I achieve that?
<p>This is how it looks at first:</p>

<p><img src="https://i.stack.imgur.com/srqRl.png" alt="The image description of the first image"></p>

<p>This is the dialog fragment that pops when "edit" is pressed and I want The change to be seen in the activity after the dialog fragment is dismissed.
<img src="https://i.stack.imgur.com/RFMsr.png" alt="The image description of the second image"></p>

<pre><code>public Dialog onCreateDialog(Bundle savedInstanceState) {
        final View view = getActivity().getLayoutInflater().inflate(R.layout.edit_profile_dialog, new LinearLayout(getActivity()), false);
        editProfile = (EditText) view.findViewById(R.id.changeProfile);
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        setupProgressDialog();
/*get value from Bundle*/
        String editValue = getArguments().getString("value", "");
        editProfile.setText(editValue);
        String title = getArguments().getString("title", "");
        builder.setTitle(title);
        builder.setView(view);
        builder.setCancelable(false);
        builder.setPositiveButton("Ok!", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
/*edit the value in shared preference*/
                sharedPref = getActivity().getSharedPreferences(getString(R.string.sharedPref), 0);
                editor = sharedPref.edit();
                editor.putString(getArguments().getString("saved", ""), editProfile.getText().toString());
                editor.apply();
               ID= sharedPref.getString("id", null);
                access_token=sharedPref.getString("token",null);
//Start of AsyncTask after this
</code></pre>