diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-11 23:05:59 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-11 23:05:59 +0000 |
commit | f7c97610c71df199380472141e5c58bc135427d8 (patch) | |
tree | 68d71fa8ca82352fe5ed4753a502875141953e9a /app/src | |
parent | 5e81ac03816846d44f376fc50a04dadd59c7e996 (diff) | |
download | infinity-for-reddit-f7c97610c71df199380472141e5c58bc135427d8.tar infinity-for-reddit-f7c97610c71df199380472141e5c58bc135427d8.tar.gz infinity-for-reddit-f7c97610c71df199380472141e5c58bc135427d8.tar.bz2 infinity-for-reddit-f7c97610c71df199380472141e5c58bc135427d8.tar.lz infinity-for-reddit-f7c97610c71df199380472141e5c58bc135427d8.tar.xz infinity-for-reddit-f7c97610c71df199380472141e5c58bc135427d8.tar.zst infinity-for-reddit-f7c97610c71df199380472141e5c58bc135427d8.zip |
Continue adding Card Layout 3.
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java | 16 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post_card_3_with_preview.xml | 80 |
2 files changed, 8 insertions, 88 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 17d3e930..16bdbcff 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -5913,14 +5913,14 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie if (mVoteButtonsOnTheRight) { ConstraintSet constraintSet = new ConstraintSet(); constraintSet.clone(bottomConstraintLayout); - constraintSet.clear(upvoteButton.getId(), ConstraintSet.START); - constraintSet.clear(downvoteButton.getId(), ConstraintSet.START); - constraintSet.clear(saveButton.getId(), ConstraintSet.END); - constraintSet.clear(shareButton.getId(), ConstraintSet.END); - constraintSet.connect(commentsCountButton.getId(), ConstraintSet.START, saveButton.getId(), ConstraintSet.END); - constraintSet.connect(commentsCountButton.getId(), ConstraintSet.END, voteButtonToggleGroup.getId(), ConstraintSet.START); - constraintSet.connect(saveButton.getId(), ConstraintSet.START, shareButton.getId(), ConstraintSet.END); - constraintSet.connect(shareButton.getId(), ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START); + constraintSet.clear(voteButtonToggleGroup.getId(), ConstraintSet.START); + constraintSet.clear(saveButton.getId(), ConstraintSet.START); + constraintSet.clear(shareButton.getId(), ConstraintSet.START); + constraintSet.connect(voteButtonToggleGroup.getId(), ConstraintSet.END, ConstraintSet.PARENT_ID, ConstraintSet.END); + constraintSet.connect(commentsCountButton.getId(), ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START); + constraintSet.connect(commentsCountButton.getId(), ConstraintSet.END, shareButton.getId(), ConstraintSet.START); + constraintSet.connect(saveButton.getId(), ConstraintSet.END, voteButtonToggleGroup.getId(), ConstraintSet.START); + constraintSet.connect(shareButton.getId(), ConstraintSet.END, saveButton.getId(), ConstraintSet.START); constraintSet.setHorizontalBias(commentsCountButton.getId(), 0); constraintSet.applyTo(bottomConstraintLayout); } diff --git a/app/src/main/res/layout/item_post_card_3_with_preview.xml b/app/src/main/res/layout/item_post_card_3_with_preview.xml index 84b61f89..24568bb7 100644 --- a/app/src/main/res/layout/item_post_card_3_with_preview.xml +++ b/app/src/main/res/layout/item_post_card_3_with_preview.xml @@ -346,86 +346,6 @@ app:layout_constraintHorizontal_bias="1" style="?attr/materialButtonOutlinedStyle" /> - <!--<ImageView - android:id="@+id/plus_button_item_post_with_preview" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView - android:id="@+id/score_text_view_item_post_with_preview" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_with_preview" /> - - <ImageView - android:id="@+id/minus_button_item_post_with_preview" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_with_preview" />--> - - <!--<TextView - android:id="@+id/comments_count_item_post_with_preview" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:gravity="center_vertical" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_card_3_with_preview" />--> - - <!--<ImageView - android:id="@+id/save_button_item_post_with_preview" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintHorizontal_bias="1" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_with_preview" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_with_preview" />--> - - <!--<ImageView - android:id="@+id/share_button_item_post_with_preview" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" />--> - </androidx.constraintlayout.widget.ConstraintLayout> </LinearLayout> |