Commit da46f085 authored by Varun Patil's avatar Varun Patil

Resize images with Picasso

parent a3777bb4
......@@ -51,7 +51,7 @@ public class BodyAdapter extends RecyclerView.Adapter<BodyAdapter.ViewHolder> {
Body body = bodyList.get(position);
holder.name.setText(body.getBodyName());
holder.description.setText(body.getBodyShortDescription());
Picasso.with(context).load(body.getBodyImageURL()).into(holder.image);
Picasso.with(context).load(body.getBodyImageURL()).resize(150, 0).into(holder.image);
}
......
......@@ -68,7 +68,7 @@ public class FeedAdapter extends RecyclerView.Adapter<FeedAdapter.ViewHolder> {
if (!eventVenueName.toString().equals(""))
viewHolder.eventVenue.setText(eventVenueName.toString().substring(2));
Picasso.with(context).load(currentEvent.getEventImageURL()).into(viewHolder.eventPicture);
Picasso.with(context).load(currentEvent.getEventImageURL()).resize(150, 0).into(viewHolder.eventPicture);
}
@Override
......
......@@ -55,7 +55,7 @@ public class RoleAdapter extends RecyclerView.Adapter<RoleAdapter.ViewHolder> {
Body roleBody = role.getRoleBodyDetails();
holder.bodyName.setText(roleBody.getBodyName());
holder.role.setText(role.getRoleName());
Picasso.with(context).load(roleBody.getBodyImageURL()).into(holder.image);
Picasso.with(context).load(roleBody.getBodyImageURL()).resize(150, 0).into(holder.image);
}
......
......@@ -49,7 +49,7 @@ public class UserAdapter extends RecyclerView.Adapter<UserAdapter.ViewHolder> {
User user = userList.get(position);
holder.userName.setText(user.getUserName());
holder.role.setText(user.getCurrentRole());
Picasso.with(context).load(user.getUserProfilePictureUrl()).resize(120, 0).into(holder.image);
Picasso.with(context).load(user.getUserProfilePictureUrl()).resize(150, 0).into(holder.image);
}
......
......@@ -102,7 +102,7 @@ public class ProfileFragment extends BaseFragment {
userRoleRecyclerView.setAdapter(roleAdapter);
userRoleRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
Picasso.with(getContext()).load(user.getUserProfilePictureUrl()).into(userProfilePictureImageView);
Picasso.with(getContext()).load(user.getUserProfilePictureUrl()).resize(800, 0).into(userProfilePictureImageView);
final List<Body> bodyList = user.getUserFollowedBodies();
final List<Event> eventList = user.getUserGoingEvents();
......
......@@ -68,7 +68,7 @@
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/colorPrimaryDark"
android:background="@color/colorWhite"
android:visibility="invisible">
<android.support.design.widget.TabItem
......
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