8000 Add property move view by Bobur-777 · Pull Request #1989 · Sketchware-Pro/Sketchware-Pro · GitHub
[go: up one dir, main page]

Skip to content

Add property move view#1989

Open
Bobur-777 wants to merge 3 commits intoSketchware-Pro:mainfrom
Bobur-777:add-property-move-view
Open

Add property move view#1989
Bobur-777 wants to merge 3 commits intoSketchware-Pro:mainfrom
Bobur-777:add-property-move-view

Conversation

@Bobur-777
Copy link
Contributor
WhatsApp.Video.2026-03-10.at.16.35.47.mp4

It is useful feature for RelativeLayout!

This commit introduces "Up" and "Down" arrow buttons to the view property editor, allowing users to reorder widgets within the same parent container.

Key changes:
- Added `img_up` and `img_down` ImageButtons to `view_property.xml`.
- Implemented `onPropertyMoved` interface in `ViewProperty.java` to handle movement triggers and toggle visibility of these buttons based on the selected view.
- Added logic in `ViewEditorFragment.java` to calculate new indices for sibling views, swap their positions, and persist the changes to the project configuration.
- The view editor now refreshes the visual selection and options menu immediately after a move operation.

The following files were modified:
- `app/src/main/java/a/a/a/ViewEditorFragment.java`
- `app/src/main/java/com/besome/sketch/editor/view/ViewProperty.java`
- `app/src/main/res/layout/view_property.xml`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0