Skip to content

Commit

Permalink
Continue adding Card Layout 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Docile-Alligator committed Sep 10, 2023
1 parent 6550bc7 commit 09adffe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2644,15 +2644,15 @@ public void onViewRecycled(@NonNull RecyclerView.ViewHolder holder) {
}
mGlide.clear(((PostVideoAutoplayViewHolder) holder).previewImageView);
((PostVideoAutoplayViewHolder) holder).previewImageView.setVisibility(View.GONE);
} else*/ if (holder instanceof PostWithPreviewTypeViewHolder) {
mGlide.clear(((PostWithPreviewTypeViewHolder) holder).imageView);
((PostWithPreviewTypeViewHolder) holder).imageView.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).imageWrapperRelativeLayout.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).errorTextView.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).progressBar.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).videoOrGifIndicatorImageView.setVisibility(View.GONE);
((PostWithPreviewTypeViewHolder) holder).linkTextView.setVisibility(View.GONE);
} else*/ if (holder instanceof PostMaterial3CardWithPreviewViewHolder) {
mGlide.clear(((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewItemPostWithPreview);
((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewItemPostWithPreview.setVisibility(View.GONE);
((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageWrapperRelativeLayoutItemPostWithPreview.setVisibility(View.GONE);
((PostMaterial3CardWithPreviewViewHolder) holder).binding.loadImageErrorTextViewItemPostWithPreview.setVisibility(View.GONE);
((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewNoPreviewGalleryItemPostWithPreview.setVisibility(View.GONE);
((PostMaterial3CardWithPreviewViewHolder) holder).binding.progressBarItemPostWithPreview.setVisibility(View.GONE);
((PostMaterial3CardWithPreviewViewHolder) holder).binding.videoOrGifIndicatorImageViewItemPostWithPreview.setVisibility(View.GONE);
((PostMaterial3CardWithPreviewViewHolder) holder).binding.linkTextViewItemPostWithPreview.setVisibility(View.GONE);
}/* else if (holder instanceof PostBaseGalleryTypeViewHolder) {
((PostBaseGalleryTypeViewHolder) holder).frameLayout.setVisibility(View.GONE);
((PostBaseGalleryTypeViewHolder) holder).noPreviewImageView.setVisibility(View.GONE);
Expand Down Expand Up @@ -5962,7 +5962,7 @@ void setBaseView(AspectRatioGifImageView iconGifImageView,
upvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
commentsCountButton.setIcon(mCommentIcon);
//commentsCountButton.setIcon(mCommentIcon);
//commentsCountButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
saveButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
shareButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
Expand Down
9 changes: 6 additions & 3 deletions app/src/main/res/layout/item_post_card_3_with_preview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottom_constraint_layout_item_post_with_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp">

<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/vote_button_toggle_item_post_card_3_with_preview"
Expand All @@ -270,7 +272,7 @@
style="?attr/materialButtonOutlinedStyle"
android:id="@+id/upvote_button_item_post_with_preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:minWidth="0dp"
Expand All @@ -283,7 +285,7 @@
style="?attr/materialButtonOutlinedStyle"
android:id="@+id/downvote_button_item_post_with_preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:minWidth="0dp"
Expand All @@ -303,6 +305,7 @@
android:textSize="?attr/font_12"
android:textStyle="bold"
android:fontFamily="?attr/font_family"
app:iconTint="@null"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_card_3_with_preview" />
Expand Down

0 comments on commit 09adffe

Please sign in to comment.