Try fixing IllegalStateException at androidx.viewpager2.widget.ScrollEventAdapter.updateScrollEventValues in ViewUserDetailActivity.

This commit is contained in:
Alex Ning 2021-08-19 21:11:44 +08:00
parent cc1e4794c9
commit b3eb20862a

View File

@ -16,6 +16,7 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@ -400,6 +401,8 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
public class CommentViewHolder extends RecyclerView.ViewHolder { public class CommentViewHolder extends RecyclerView.ViewHolder {
@BindView(R.id.vertical_block_indentation_item_comment) @BindView(R.id.vertical_block_indentation_item_comment)
CommentIndentationView commentIndentationView; CommentIndentationView commentIndentationView;
@BindView(R.id.linear_layout_item_comment)
LinearLayout linearLayout;
@BindView(R.id.author_text_view_item_post_comment) @BindView(R.id.author_text_view_item_post_comment)
TextView authorTextView; TextView authorTextView;
@BindView(R.id.author_flair_text_view_item_post_comment) @BindView(R.id.author_flair_text_view_item_post_comment)
@ -455,6 +458,8 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
constraintSet.applyTo(bottomConstraintLayout); constraintSet.applyTo(bottomConstraintLayout);
} }
linearLayout.getLayoutTransition().setAnimateParentHierarchy(false);
commentIndentationView.setVisibility(View.GONE); commentIndentationView.setVisibility(View.GONE);
if (mShowCommentDivider) { if (mShowCommentDivider) {