title: How to set image of navigation drawer viewer from uri in another activity
body: <p><strong>How I can set image of user which showed in navigation drawer with download URI</strong> </p>
  
  <pre><code>public class UserProfileActivity extends AppCompatActivity {
  
      private FloatingActionButton buttonSaveImage;
      private FloatingActionButton buttonSelectImage;
      private ImageView imageView;
      private static final int PICK_IMAGE_REQUEST = 123;
      private Uri filePath;
      private FirebaseAuth mAuth;
      private FirebaseStorage fStorage;
      private ProgressDialog progressDialog;
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
  
          if (requestCode == PICK_IMAGE_REQUEST &amp;&amp; resultCode == RESULT_OK &amp;&amp; data != null &amp;&amp; data.getData() != null) {
              filePath = data.getData();
              try {
                  Picasso.with(UserProfileActivity.this).load(filePath).fit().centerCrop().into(imageView);
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      }
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_user_profile);
  
          mAuth = FirebaseAuth.getInstance();
          fStorage = FirebaseStorage.getInstance();
  
  
          buttonSelectImage = (FloatingActionButton) findViewById(R.id.fab);
          buttonSaveImage = (FloatingActionButton) findViewById(R.id.fab2);
          imageView = (ImageView) findViewById(R.id.imageView);
  
  
          progressDialog = new ProgressDialog(UserProfileActivity.this);
          progressDialog.setMessage("Yükleniyor...");
          progressDialog.setCancelable(false);
          progressDialog.show();
  
          NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
          navigationView.setNavigationItemSelectedListener(this);
  
          final View headerView = navigationView.getHeaderView(0);
  
          final ImageView imageViewUser =  (ImageView)headerView.findViewById(R.id.profile_image);
  
  
  
  
          StorageReference storageRef = fStorage.getReference().child("users").child(mAuth.getCurrentUser().getUid());
          storageRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener&lt;Uri&gt;() {
              @Override
              public void onSuccess(Uri uri) {
  
                  Log.i("URI VALUE","-&gt;"+ uri);
                  final ImageView imageViewUser =  (ImageView)headerView.findViewById(R.id.profile_image);
                  progressDialog.dismiss();
                  Picasso.with(UserProfileActivity.this).load(uri).fit().centerCrop().into(imageView);
                  Picasso.with(UserProfileActivity.this).load(uri).fit().centerCrop().into(imageViewUser);
  
              }
          }).addOnFailureListener(new OnFailureListener() {
              @Override
              public void onFailure(@NonNull Exception e) {
  
                  progressDialog.dismiss();
                  Toast.makeText(UserProfileActivity.this, "" + e.getMessage(), Toast.LENGTH_SHORT).show();
  
              }
          });
  
  
          buttonSelectImage.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  buttonSelectImage.setVisibility(View.INVISIBLE);
  
                  Intent intent = new Intent();
                  intent.setType("image/*");
                  intent.setAction(Intent.ACTION_GET_CONTENT);
                  startActivityForResult(Intent.createChooser(intent, "Resim Seçiniz"), PICK_IMAGE_REQUEST);
  
                  buttonSaveImage.setVisibility(View.VISIBLE);
              }
          });
  
          buttonSaveImage.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
  
                  buttonSaveImage.setVisibility(View.INVISIBLE);
                  if (filePath != null) {
  
                      progressDialog = new ProgressDialog(UserProfileActivity.this);
                      progressDialog.setMessage("Yükleniyor...");
                      progressDialog.setCancelable(false);
                      progressDialog.show();
                      StorageReference storageRef = fStorage.getReference().child("users").child(mAuth.getCurrentUser().getUid());
                      storageRef.putFile(filePath).addOnSuccessListener(new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {
                          @Override
                          public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
  
                              progressDialog.dismiss();
                              Toast.makeText(UserProfileActivity.this, "Fotoğraf başarılı bir şekilde kaydedildi.", Toast.LENGTH_SHORT).show();
                              imageView.setImageBitmap(null);
  
                          }
                      }).addOnFailureListener(new OnFailureListener() {
                          @Override
                          public void onFailure(@NonNull Exception e) {
  
                              progressDialog.dismiss();
                              Toast.makeText(UserProfileActivity.this, "" + e.getMessage(), Toast.LENGTH_SHORT).show();
  
                          }
                      });
  
  
                  }
                  buttonSelectImage.setVisibility(View.VISIBLE);
  
              }
          });
      }
  }
  </code></pre>
  
  <p>I use firebase storage to storage images and I do it well, but I can not show that image which I uploaded for user in navigation drawer Image viewer </p>
  
  <p>Navigaiton header 
      
  
  <pre><code>    xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="@dimen/nav_header_height"
      android:background="@color/overloyBackground"
      android:gravity="bottom"
      android:orientation="vertical"
      android:paddingBottom="16dp"
      android:paddingLeft="16dp"
      android:paddingRight="16dp"
      android:paddingTop="16dp"&gt;
  
      &lt;de.hdodenhof.circleimageview.CircleImageView
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:id="@+id/profile_image"
          android:layout_width="100dp"
          android:layout_height="100dp"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          android:src="@drawable/user"
          app:border_color="@android:color/white"
          app:border_width="3dp" /&gt;
  
      &lt;TextView
          android:id="@+id/txtFullName"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:paddingTop="@dimen/nav_header_vertical_spacing"
          android:textSize="24sp"
          android:text=""
          android:textAppearance="@style/TextAppearance.AppCompat.Body1" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>activity_user_profile</p>
  
  <pre><code>xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/bg"
      android:orientation="vertical"&gt;
  
      &lt;LinearLayout
          android:id="@+id/viewA"
          android:layout_width="match_parent"
          android:layout_height="463dp"
          android:layout_weight="0.6"
          android:background="@android:color/white"
          android:orientation="horizontal" &gt;
  
          &lt;ImageView
              android:id="@+id/imageView"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              app:srcCompat="@drawable/no_image_user" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/viewB"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_weight="0.4"
          android:background="@android:color/white"
          android:orientation="horizontal"&gt;
  
          &lt;TextView
              android:id="@+id/textView3"
              android:layout_width="wrap_content"
              android:layout_height="53dp"
              android:layout_weight="1"
              android:text="Name"
              android:textSize="25sp"
              /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/fab"
      android:layout_width="69dp"
      android:layout_height="69dp"
      android:layout_margin="16dp"
      android:background="@android:color/transparent"
      android:clickable="true"
      android:src="@drawable/camera"
      app:layout_anchor="@id/viewA"
      app:layout_anchorGravity="bottom|right|end"
      tools:layout_editor_absoluteX="250dp"
      tools:layout_editor_absoluteY="146dp" /&gt;
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/fab2"
      android:layout_width="69dp"
      android:layout_height="69dp"
      android:layout_margin="16dp"
      android:background="@android:color/transparent"
      android:clickable="true"
      android:visibility="visible"
      android:src="@drawable/onay"
      app:layout_anchor="@id/viewA"
      app:layout_anchorGravity="bottom|right|end"
      tools:layout_editor_absoluteX="299dp"
      tools:layout_editor_absoluteY="146dp"/&gt;
  </code></pre>
  
  <p><strong>Here my logcat</strong></p>
  
  <blockquote>
    <p>FATAL EXCEPTION: main
                                                                                Process: com.example.ytam.fonetegitim, PID: 9482
                                                                                java.lang.RuntimeException: Unable to start activity
    ComponentInfo{com.example.ytam.fonetegitim/com.example.ytam.fonetegitim.UserProfileActivity}:
    java.lang.NullPointerException: Attempt to invoke virtual method
    'android.view.View
    android.support.design.widget.NavigationView.getHeaderView(int)' on a
    null object reference
                                                                                    at
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
                                                                                    at
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
                                                                                    at android.app.ActivityThread.-wrap11(Unknown Source:0)
                                                                                    at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
                                                                                    at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                    at android.os.Looper.loop(Looper.java:164)
                                                                                    at android.app.ActivityThread.main(ActivityThread.java:6494)
                                                                                    at java.lang.reflect.Method.invoke(Native Method)
                                                                                    at
    com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
                                                                                 Caused by: java.lang.NullPointerException: Attempt to invoke virtual
    method 'android.view.View
    android.support.design.widget.NavigationView.getHeaderView(int)' on a
    null object reference
                                                                                    at
    com.example.ytam.fonetegitim.UserProfileActivity.onCreate(UserProfileActivity.java:77)
                                                                                    at android.app.Activity.performCreate(Activity.java:6999)
                                                                                    at android.app.Activity.performCreate(Activity.java:6990)
                                                                                    at
    android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
                                                                                    at
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
                                                                                    at
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
                                                                                    at android.app.ActivityThread.-wrap11(Unknown Source:0) 
                                                                                    at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
                                                                                    at android.os.Handler.dispatchMessage(Handler.java:106) 
                                                                                    at android.os.Looper.loop(Looper.java:164) 
                                                                                    at android.app.ActivityThread.main(ActivityThread.java:6494) 
                                                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                                                    at
    com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)</p>
  </blockquote>
  
  <p> </p>