Browse Source

No background for media items

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
f1721c37ec
  1. 1
      app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemMediaViewHolder.java
  2. 8
      app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemViewHolder.java

1
app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemMediaViewHolder.java

@ -50,7 +50,6 @@ public class DirectItemMediaViewHolder extends DirectItemViewHolder {
incomingRoundingParams = RoundingParams.fromCornersRadii(dmRadiusSmall, dmRadius, dmRadius, dmRadius);
outgoingRoundingParams = RoundingParams.fromCornersRadii(dmRadius, dmRadiusSmall, dmRadius, dmRadius);
setItemView(binding.getRoot());
removeBg();
}
@Override

8
app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemViewHolder.java

@ -100,9 +100,7 @@ public abstract class DirectItemViewHolder extends RecyclerView.ViewHolder {
binding.ivProfilePic.setVisibility(View.GONE);
binding.tvUsername.setVisibility(View.GONE);
containerLayoutParams.gravity = Gravity.CENTER;
if (itemType == DirectItemType.ACTION_LOG || itemType == DirectItemType.VIDEO_CALL_EVENT) {
binding.messageInfo.setVisibility(View.GONE);
}
binding.messageInfo.setVisibility(View.GONE);
}
if (itemType == DirectItemType.REEL_SHARE) {
containerLayoutParams.setMarginStart(0);
@ -119,6 +117,10 @@ public abstract class DirectItemViewHolder extends RecyclerView.ViewHolder {
messageInfoPaddingSmall,
dmRadiusSmall);
}
if (itemType == DirectItemType.MEDIA) {
// no background for media items
binding.background.setBackgroundResource(0);
}
binding.messageTime.setText(DateFormat.getTimeFormat(itemView.getContext()).format(item.getDate()));
if (messageDirection == MessageDirection.OUTGOING) {
if (item.isPending()) {

Loading…
Cancel
Save