title: I am trying to set the profile image and name in the navigation header but the code is not working
body: <p>The following code is used to to set the profile image and name, but it is not working and does not show any error on the logcat.  I want to add the image and name in header of navigation drawer. Kindly help.</p>
  <pre><code> public class Admin_Dashboard_Activity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener{
      
          private AppBarConfiguration mAppBarConfiguration;
          private ActivityAdminDashboardBinding binding;
      
          CircleImageView profile_imageView;
          TextView profile_Name;
          RecyclerView mRecyclerView;
          List&lt;FoodData&gt; myFoodList;
          String profileImageUrl, userName;
          FoodData mFoodData;
          private ValueEventListener eventListener;
      
          DrawerLayout drawer;
          NavigationView navigationView;
          //
          DatabaseReference databaseReference;
          FirebaseAuth mAuth;
          FirebaseUser mUser;
          ///
          
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
             // setContentView(R.layout.activity_admin_dashboard);
      
              binding = ActivityAdminDashboardBinding.inflate(getLayoutInflater());
              setContentView(binding.getRoot());
      
              //
              mAuth = FirebaseAuth.getInstance();
              mUser = mAuth.getCurrentUser();
              databaseReference = FirebaseDatabase.getInstance().getReference().child(&quot;Profile_Credentials&quot;);
              ///
      
              setSupportActionBar(binding.appBarAdminDashboard.toolbar);
              binding.appBarAdminDashboard.fab.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                      Intent intent = new Intent(Admin_Dashboard_Activity.this, Upload_Recipe.class);
                      startActivity(intent);
                  }
              });
      
              drawer = findViewById(R.id.drawer_layout);
              navigationView = findViewById(R.id.nav_view);
      
      
             // View view = navigationView.inflateHeaderView(R.layout.nav_header_admin_dashboard);
              profile_imageView = navigationView.getHeaderView(0).findViewById(R.id.profile_imageView);
              profile_Name = navigationView.getHeaderView(0).findViewById(R.id.profile_Name);
      
              databaseReference.child(mUser.getUid()).addValueEventListener(new ValueEventListener() {
                  @Override
                  public void onDataChange(@NonNull DataSnapshot snapshot) {
                      if (snapshot.exists()){
                          profileImageUrl = snapshot.child(&quot;itemImage&quot;).getValue().toString();
                          userName = snapshot.child(&quot;itemName&quot;).getValue().toString();
                          Glide.with(getApplicationContext()).load(profileImageUrl).into(profile_imageView);
                       //   Picasso.get().load(profileImageUrl).into(profile_imageView);
                          profile_Name.setText(userName);
                      }
                  }
      
                  @Override
                  public void onCancelled(@NonNull DatabaseError error) {
                      Toast.makeText(Admin_Dashboard_Activity.this, &quot;Sorry!!&quot;, Toast.LENGTH_SHORT).show();
                  }
              });
  </code></pre>
  <p>I think I used the correct method for retriving, but still don't show any result.</p>