Implementation of Drag&Drop behavior in an Android application based on the gesture processing API.
- Authors: Petrovsky A.A.1, Rysin M.L.1
-
Affiliations:
- Issue: No 2 (2025)
- Pages: 148-164
- Section: Articles
- URL: https://journals.rcsi.science/2454-0714/article/view/359377
- DOI: https://doi.org/10.7256/2454-0714.2025.2.74122
- EDN: https://elibrary.ru/FIAYDF
- ID: 359377
Cite item
Full Text
Abstract
The subject of the study is the organization of the movement of user interface objects (User Interface, UI) in Android applications. The focus of the research is the development of a software solution for implementing Drag&Drop behavior in mobile Android applications using the modern user interface framework Jetpack Compose. The relevance of the presented work is due to the need to create flexible and intuitive mechanisms for user interaction with the interface of mobile Android applications. The main results of the research include: 1. Development of a set of Composable functions for managing the Drag&Drop state of user interface objects. 2. Integration of the behavior of the "source" and "receiver" of the moving UI objects with the possibility of decoration. 3. Overcoming the limitations of the built-in tools of the Jetpack Compose framework. 4. Creation of a mechanism for handling user movement gestures. 5. Formation of a universal approach to implementing interactive interaction with interface elements. The methodology is based on the application of the architectural pattern MVI (Model-View-Intent), which provides effective management of interface state, and the use of object-oriented design patterns, in particular, the "decorator" pattern. Research methods include analyzing existing approaches to implementing Drag&Drop, designing a software solution, developing a prototype, and testing it within a mobile application. The scientific novelty of the research lies in the development of an innovative approach to organizing Drag&Drop interaction, which allows overcoming the limitations of built-in tools of the Jetpack Compose framework. The proposed solution is characterized by: - complete isolation of Drag&Drop components; - possibility of decorating moving UI objects; - flexible configuration of the behavior of the source and receiver of interface objects; - absence of rigid connections between user interface components. The practical significance of the work lies in the development of tools that can be successfully applied in various mobile software projects requiring complex user interactions. The conclusions of the research demonstrate the effectiveness of the proposed solution in overcoming the existing limitations of Jetpack Compose and open new opportunities for creating more dynamic and user-friendly interfaces in mobile applications.
About the authors
Aleksandr Andreevich Petrovsky
Email: petrovskiy.a.a@edu.mirea.ru
Mikhail Leonidovich Rysin
Email: rysin@mirea.ru
References
What is Drag and Drop? Drag and Drop explained [Электронный ресурс]. URL: https://goodspeed.studio/glossary/what-is-drag-and-drop-drag-and-drop-explained (дата обращения: 14.03.2025). Jetpack Compose [Электронный ресурс]. URL: https://developer.android.com/compose (дата обращения: 18.03.2025). Почему так удобно использовать паттерн MVI в KMM [Электронный ресурс]. URL: https://habr.com/ru/companies/kts/articles/729832/ (дата обращения: 18.03.2025). Jetpack Compose: Drag and Drop [Электронный ресурс]. URL: https://developer.android.com/develop/ui/compose/touch-input/user-interactions/drag-and-drop (дата обращения: 20.03.2025). Google IssueTracker: DragAndDropTarget [Электронный ресурс]. URL: https://issuetracker.google.com/issues/324280271 (дата обращения: 20.03.2025). Мартин Р. Чистая архитектура. Искусство разработки программного обеспечения. – СПб.: Питер, 2024. – 352 с. Гамма Э., Хелм Р., Джонсон Р., Влиссидес Дж. Паттерны объектно-ориентированного программирования. – СПб.: Питер, 2022. – 448 с. Jetpack Compose: CompositionLocal [Электронный ресурс]. URL: https://developer.android.com/develop/ui/compose/compositionlocal (дата обращения: 05.03.2025). Jetpack Compose: GraphicsLayer [Электронный ресурс]. URL: https://developer.android.com/develop/ui/compose/graphics/draw/modifiers (дата обращения: 10.03.2025). Kotlin: Scope-functions [Электронный ресурс]. URL: https://kotlinlang.org/docs/lambdas.html#invoking-a-function-type-instance (дата обращения: 11.03.2025). Jetpack Compose: Pointer Input [Электронный ресурс]. URL: https://developer.android.com/develop/ui/compose/touch-input/pointer-input (дата обращения: 15.03.2025).
Supplementary files

