app/src/main/java/ch/epfl/culturequest/social/PictureAdapter.java
File PictureAdapter.java
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package ch.epfl.culturequest.social;
import static ch.epfl.culturequest.social.RarityLevel.getRarityLevel;
import android.animation.Animator;
Method onBindViewHolder
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public void onBindViewHolder(@NonNull PictureViewHolder holder, int position) {
Post post = pictures.get(position);
String pictureUrl = post.getImageUrl();
Method handleLike
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void handleLike(@NonNull PictureViewHolder holder, Post post) {
if (post.getUid().equals(Profile.getActiveProfile().getUid())) {
holder.like.setVisibility(View.GONE);
return;
}
Method flip
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void flip(Context context, View visibleView, View inVisibleView) {
isFlipping = true;
visibleView.setVisibility(View.VISIBLE);
float scale = context.getResources().getDisplayMetrics().density;
float cameraDist = 8000 * scale;