Commit ed39340d authored by Sajal Narang's avatar Sajal Narang

Make user card in SettingsFragment clickable

parent a0b1183f
...@@ -21,6 +21,7 @@ import app.insti.Constants; ...@@ -21,6 +21,7 @@ import app.insti.Constants;
import app.insti.R; import app.insti.R;
import app.insti.SessionManager; import app.insti.SessionManager;
import app.insti.activity.LoginActivity; import app.insti.activity.LoginActivity;
import app.insti.activity.MainActivity;
import app.insti.api.RetrofitInterface; import app.insti.api.RetrofitInterface;
import app.insti.api.ServiceGenerator; import app.insti.api.ServiceGenerator;
import app.insti.data.User; import app.insti.data.User;
...@@ -87,6 +88,14 @@ public class SettingsFragment extends Fragment { ...@@ -87,6 +88,14 @@ public class SettingsFragment extends Fragment {
.placeholder(R.drawable.user_placeholder) .placeholder(R.drawable.user_placeholder)
.into(userProfilePictureImageView); .into(userProfilePictureImageView);
userNameTextView.setText(user.getUserName()); userNameTextView.setText(user.getUserName());
getView().findViewById(R.id.role_card_layout).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ProfileFragment profileFragment = ProfileFragment.newInstance(user.getUserID());
((MainActivity)getActivity()).updateFragment(profileFragment);
}
});
} }
private void populateViews() { private void populateViews() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment