use of in.ac.iitb.gymkhana.iitbapp.fragment.ProfileFragment in project IITB-App by wncc.
the class MainActivity method updateNavigationView.
private void updateNavigationView() {
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
View header = navigationView.getHeaderView(0);
header.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Bundle bundle = new Bundle();
bundle.putString(Constants.USER_ID, currentUser.getUserID());
ProfileFragment profileFragment = new ProfileFragment();
profileFragment.setArguments(bundle);
updateFragment(profileFragment);
DrawerLayout drawer = findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
}
});
TextView nameTextView = header.findViewById(R.id.user_name_nav_header);
TextView rollNoTextView = header.findViewById(R.id.user_rollno_nav_header);
ImageView profilePictureImageView = header.findViewById(R.id.user_profile_picture_nav_header);
nameTextView.setText(currentUser.getUserName());
rollNoTextView.setText(currentUser.getUserRollNumber());
Picasso.with(this).load(currentUser.getUserProfilePictureUrl()).into(profilePictureImageView);
}
Aggregations