Terminal View Text Selection via Dynamic Editable Attributes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing application programs restrict users from copying and pasting characters in views individually, impacting user experience by requiring all text to be copied and pasted as a whole, necessitating unwanted text deletion.
Innovation Solution
A method involving a bottom layer interface that sets the view's attribute to be editable, allowing users to set start and end positions for character selection and copying through long pressing and clicking operations, with the ability to invoke functions like setTextIsSelectable to facilitate character selection and editing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If the view attribute is set to non-editable (default), then the view maintains its animation effects and stability, but users cannot copy individual characters or sections of text
Solution Approach 1:
The view attribute is dynamically changed from non-editable to editable based on user interaction. When a long press operation is detected, the system temporarily sets the view attribute to editable, enabling character selection and copying. After the operation sequence completes, the attribute is restored to its original non-editable state, maintaining animation effects while providing selective editing capability when needed.
2Ease of operation
If all text in the view must be copied as a whole, then the copying operation is simple, but users cannot selectively copy individual characters or sections
Solution Approach 1:
The text content is segmented into selectable character units when the view attribute is set to editable. Users can select individual characters or continuous sections between start and end positions. The system copies only the selected segments to the clipboard, allowing users to paste only the needed portions without copying the entire text, thereby saving time and effort.
3Ease of operation
If the view attribute is set to editable, then users can select and copy individual characters, but the animation effects may be affected
Solution Approach 1:
The view attribute transitions dynamically between editable and non-editable states. During the editing operation sequence (long press to start, clicking to select, paste to complete), the attribute is set to editable enabling character selection. Once the operation sequence finishes, the attribute is restored to non-editable, ensuring animation effects remain stable and consistent without being affected by editing operations.
Data Source
Figure 1~2
Figure 3
AI summary
The present disclosure provides a terminal, a view character copying method thereof, and a storage apparatus. The copying method may include: receiving a triggering operation of a user, and determining a view of which character copying needs to be executed according to the triggering operation; invoking a bottom layer interface to set an attribute of the view to be editable; receiving a clicking operation performed to the view and copying characters between a start position and an end position. Based on this method, the present disclosure may allow users to copy and paste characters in the view at will, improving user experience.