Commit e2cedc42 authored by Varun Patil's avatar Varun Patil

Remove profile pic from complaint adapter

parent b743c356
...@@ -61,7 +61,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol ...@@ -61,7 +61,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
public class ComplaintsViewHolder extends RecyclerView.ViewHolder { public class ComplaintsViewHolder extends RecyclerView.ViewHolder {
private CardView cardView; private CardView cardView;
private CircleImageView circleImageView;
private ImageButton buttonComments; private ImageButton buttonComments;
private ImageButton buttonVotes; private ImageButton buttonVotes;
private ImageButton notificationson; private ImageButton notificationson;
...@@ -88,7 +87,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol ...@@ -88,7 +87,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
notificationson = currentView.findViewById(R.id.buttonnotificationson); notificationson = currentView.findViewById(R.id.buttonnotificationson);
textViewComments = currentView.findViewById(R.id.text_comments); textViewComments = currentView.findViewById(R.id.text_comments);
textViewVotes = currentView.findViewById(R.id.text_votes); textViewVotes = currentView.findViewById(R.id.text_votes);
circleImageView = currentView.findViewById(R.id.circleImageViewUserImage);
} }
private void bindHolder(final int position) { private void bindHolder(final int position) {
...@@ -102,7 +100,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol ...@@ -102,7 +100,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}); });
try { try {
populateViews(pos, circleImageView, notificationson, notificationsoff, textViewVotes, textViewComments); populateViews(pos, notificationson, notificationsoff, textViewVotes, textViewComments);
buttonComments.setOnClickListener(new View.OnClickListener() { buttonComments.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -174,10 +172,8 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol ...@@ -174,10 +172,8 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
} }
} }
private void populateViews(int pos, CircleImageView circleImageView, ImageButton notificationson, ImageButton notificationsoff, TextView textViewVotes, TextView textViewComments) { private void populateViews(int pos, ImageButton notificationson, ImageButton notificationsoff, TextView textViewVotes, TextView textViewComments) {
try { try {
String profileUrl = complaintList.get(pos).getComplaintCreatedBy().getUserProfilePictureUrl();
Picasso.get().load(profileUrl).placeholder(R.drawable.user_placeholder).into(circleImageView);
textViewLocation.setText(complaintList.get(pos).getLocationDescription()); textViewLocation.setText(complaintList.get(pos).getLocationDescription());
textViewUserName.setText(complaintList.get(pos).getComplaintCreatedBy().getUserName()); textViewUserName.setText(complaintList.get(pos).getComplaintCreatedBy().getUserName());
textViewStatus.setText(complaintList.get(pos).getStatus().toUpperCase()); textViewStatus.setText(complaintList.get(pos).getStatus().toUpperCase());
......
...@@ -25,20 +25,12 @@ ...@@ -25,20 +25,12 @@
android:padding="5dp" android:padding="5dp"
android:orientation="horizontal"> android:orientation="horizontal">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/circleImageViewUserImage"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="top"
android:scaleType="centerCrop" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayoutUser" android:id="@+id/linearLayoutUser"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp" android:layout_marginRight="5dp"
android:layout_marginRight="12dp"
android:layout_weight="3" android:layout_weight="3"
android:orientation="vertical"> android:orientation="vertical">
......
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