diff options
author | Alex Ning <chineseperson5@gmail.com> | 2022-01-21 07:44:49 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2022-01-21 07:44:49 +0000 |
commit | de105359f90753828836dbe6181d45558a905bc3 (patch) | |
tree | fa23967511e412537eb03bbc169bce01b2efec80 /app/src/main/java/ml | |
parent | c6f5e3c8f60846dd3db93199ba8ea2bdfe1d9f75 (diff) | |
download | infinity-for-reddit-de105359f90753828836dbe6181d45558a905bc3.tar infinity-for-reddit-de105359f90753828836dbe6181d45558a905bc3.tar.gz infinity-for-reddit-de105359f90753828836dbe6181d45558a905bc3.tar.bz2 infinity-for-reddit-de105359f90753828836dbe6181d45558a905bc3.tar.lz infinity-for-reddit-de105359f90753828836dbe6181d45558a905bc3.tar.xz infinity-for-reddit-de105359f90753828836dbe6181d45558a905bc3.tar.zst infinity-for-reddit-de105359f90753828836dbe6181d45558a905bc3.zip |
Fix views in comment toolbar overlapping each other.
Diffstat (limited to 'app/src/main/java/ml')
2 files changed, 42 insertions, 7 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java index 33fd9075..5800244d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java @@ -369,6 +369,8 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment TextView scoreTextView; @BindView(R.id.down_vote_button_item_post_comment) ImageView downvoteButton; + @BindView(R.id.placeholder_item_post_comment) + View placeholder; @BindView(R.id.more_button_item_post_comment) ImageView moreButton; @BindView(R.id.save_button_item_post_comment) @@ -390,19 +392,35 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment ConstraintSet constraintSet = new ConstraintSet(); constraintSet.clone(bottomConstraintLayout); constraintSet.clear(upvoteButton.getId(), ConstraintSet.START); + constraintSet.clear(upvoteButton.getId(), ConstraintSet.END); constraintSet.clear(scoreTextView.getId(), ConstraintSet.START); + constraintSet.clear(scoreTextView.getId(), ConstraintSet.END); constraintSet.clear(downvoteButton.getId(), ConstraintSet.START); + constraintSet.clear(downvoteButton.getId(), ConstraintSet.END); + constraintSet.clear(expandButton.getId(), ConstraintSet.START); constraintSet.clear(expandButton.getId(), ConstraintSet.END); + constraintSet.clear(saveButton.getId(), ConstraintSet.START); + constraintSet.clear(saveButton.getId(), ConstraintSet.END); + constraintSet.clear(replyButton.getId(), ConstraintSet.START); constraintSet.clear(replyButton.getId(), ConstraintSet.END); + constraintSet.clear(moreButton.getId(), ConstraintSet.START); + constraintSet.clear(moreButton.getId(), ConstraintSet.END); constraintSet.connect(upvoteButton.getId(), ConstraintSet.END, scoreTextView.getId(), ConstraintSet.START); + constraintSet.connect(upvoteButton.getId(), ConstraintSet.START, placeholder.getId(), ConstraintSet.END); constraintSet.connect(scoreTextView.getId(), ConstraintSet.END, downvoteButton.getId(), ConstraintSet.START); + constraintSet.connect(scoreTextView.getId(), ConstraintSet.START, upvoteButton.getId(), ConstraintSet.END); constraintSet.connect(downvoteButton.getId(), ConstraintSet.END, ConstraintSet.PARENT_ID, ConstraintSet.END); - constraintSet.connect(saveButton.getId(), ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START); - constraintSet.connect(moreButton.getId(), ConstraintSet.START, saveButton.getId(), ConstraintSet.END); - constraintSet.connect(moreButton.getId(), ConstraintSet.END, upvoteButton.getId(), ConstraintSet.END); - constraintSet.connect(expandButton.getId(), ConstraintSet.START, replyButton.getId(), ConstraintSet.END); - constraintSet.connect(replyButton.getId(), ConstraintSet.START, replyButton.getId(), ConstraintSet.END); - constraintSet.setHorizontalBias(moreButton.getId(), 0); + constraintSet.connect(downvoteButton.getId(), ConstraintSet.START, scoreTextView.getId(), ConstraintSet.END); + constraintSet.connect(placeholder.getId(), ConstraintSet.END, upvoteButton.getId(), ConstraintSet.START); + constraintSet.connect(placeholder.getId(), ConstraintSet.START, moreButton.getId(), ConstraintSet.END); + constraintSet.connect(moreButton.getId(), ConstraintSet.START, expandButton.getId(), ConstraintSet.END); + constraintSet.connect(moreButton.getId(), ConstraintSet.END, placeholder.getId(), ConstraintSet.START); + constraintSet.connect(expandButton.getId(), ConstraintSet.START, saveButton.getId(), ConstraintSet.END); + constraintSet.connect(expandButton.getId(), ConstraintSet.END, moreButton.getId(), ConstraintSet.START); + constraintSet.connect(saveButton.getId(), ConstraintSet.START, replyButton.getId(), ConstraintSet.END); + constraintSet.connect(saveButton.getId(), ConstraintSet.END, expandButton.getId(), ConstraintSet.START); + constraintSet.connect(replyButton.getId(), ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START); + constraintSet.connect(replyButton.getId(), ConstraintSet.END, saveButton.getId(), ConstraintSet.START); constraintSet.applyTo(bottomConstraintLayout); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java index 89a60635..a11c0266 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -1098,6 +1098,8 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi TextView scoreTextView; @BindView(R.id.down_vote_button_item_post_comment) ImageView downvoteButton; + @BindView(R.id.placeholder_item_post_comment) + View placeholder; @BindView(R.id.more_button_item_post_comment) ImageView moreButton; @BindView(R.id.save_button_item_post_comment) @@ -1119,20 +1121,35 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi ConstraintSet constraintSet = new ConstraintSet(); constraintSet.clone(bottomConstraintLayout); constraintSet.clear(upvoteButton.getId(), ConstraintSet.START); + constraintSet.clear(upvoteButton.getId(), ConstraintSet.END); constraintSet.clear(scoreTextView.getId(), ConstraintSet.START); + constraintSet.clear(scoreTextView.getId(), ConstraintSet.END); constraintSet.clear(downvoteButton.getId(), ConstraintSet.START); + constraintSet.clear(downvoteButton.getId(), ConstraintSet.END); + constraintSet.clear(expandButton.getId(), ConstraintSet.START); constraintSet.clear(expandButton.getId(), ConstraintSet.END); + constraintSet.clear(saveButton.getId(), ConstraintSet.START); constraintSet.clear(saveButton.getId(), ConstraintSet.END); + constraintSet.clear(replyButton.getId(), ConstraintSet.START); constraintSet.clear(replyButton.getId(), ConstraintSet.END); + constraintSet.clear(moreButton.getId(), ConstraintSet.START); constraintSet.clear(moreButton.getId(), ConstraintSet.END); constraintSet.connect(upvoteButton.getId(), ConstraintSet.END, scoreTextView.getId(), ConstraintSet.START); + constraintSet.connect(upvoteButton.getId(), ConstraintSet.START, placeholder.getId(), ConstraintSet.END); constraintSet.connect(scoreTextView.getId(), ConstraintSet.END, downvoteButton.getId(), ConstraintSet.START); + constraintSet.connect(scoreTextView.getId(), ConstraintSet.START, upvoteButton.getId(), ConstraintSet.END); constraintSet.connect(downvoteButton.getId(), ConstraintSet.END, ConstraintSet.PARENT_ID, ConstraintSet.END); + constraintSet.connect(downvoteButton.getId(), ConstraintSet.START, scoreTextView.getId(), ConstraintSet.END); + constraintSet.connect(placeholder.getId(), ConstraintSet.END, upvoteButton.getId(), ConstraintSet.START); + constraintSet.connect(placeholder.getId(), ConstraintSet.START, moreButton.getId(), ConstraintSet.END); constraintSet.connect(moreButton.getId(), ConstraintSet.START, expandButton.getId(), ConstraintSet.END); + constraintSet.connect(moreButton.getId(), ConstraintSet.END, placeholder.getId(), ConstraintSet.START); constraintSet.connect(expandButton.getId(), ConstraintSet.START, saveButton.getId(), ConstraintSet.END); + constraintSet.connect(expandButton.getId(), ConstraintSet.END, moreButton.getId(), ConstraintSet.START); constraintSet.connect(saveButton.getId(), ConstraintSet.START, replyButton.getId(), ConstraintSet.END); + constraintSet.connect(saveButton.getId(), ConstraintSet.END, expandButton.getId(), ConstraintSet.START); constraintSet.connect(replyButton.getId(), ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START); - constraintSet.setHorizontalBias(moreButton.getId(), 0); + constraintSet.connect(replyButton.getId(), ConstraintSet.END, saveButton.getId(), ConstraintSet.START); constraintSet.applyTo(bottomConstraintLayout); } |