Skip to content

Commit

Permalink
fixes copy option not appearing for multi asset upload (#5320)
Browse files Browse the repository at this point in the history
  • Loading branch information
srishti-R authored Oct 1, 2023
1 parent fec27ed commit f7e6d30
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,21 @@ public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
.inflate(R.layout.row_item_description, parent, false));
}

/**
* This is a workaround for a known bug by android here https://issuetracker.google.com/issues/37095917
* makes the edit text on second and subsequent fragments inside an adapter receptive to long click
* for copy/paste options
* @param holder the view holder
*/
@Override
public void onViewAttachedToWindow(@NonNull final ViewHolder holder) {
super.onViewAttachedToWindow(holder);
holder.captionItemEditText.setEnabled(false);
holder.captionItemEditText.setEnabled(true);
holder.descItemEditText.setEnabled(false);
holder.descItemEditText.setEnabled(true);
}

@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.bind(position);
Expand Down

0 comments on commit f7e6d30

Please sign in to comment.