Table of Contents
Fetching ...

UITrans: Seamless UI Translation from Android to HarmonyOS

Lina Gong, Chen Wang, Yujun Huang, Di Cui, Mingqiang Wei

TL;DR

UITrans tackles cross-platform UI translation from Android to HarmonyOS ArkUI. It introduces an LLM-driven multi-agent reflective collaboration framework with Retrieval-Augmented Generation to map Android XML layouts to ArkUI components and to reason about complex layouts and interaction logic. The pipeline includes Android project parsing, translation task planning, minimal unit generation with domain knowledge and reflective re-generation, and dependency assembly to produce a complete HarmonyOS project. Evaluation on six open-source applications yields component, page, and project success rates above 89%, demonstrating practical feasibility; the authors also provide a public online service and benchmarks for Android-to-HarmonyOS UI translation.

Abstract

Seamless user interface (i.e., UI) translation has emerged as a pivotal technique for modern mobile developers, addressing the challenge of developing separate UI applications for Android and HarmonyOS platforms due to fundamental differences in layout structures and development paradigms. In this paper, we present UITrans, the first automated UI translation tool designed for Android to HarmonyOS. UITrans leverages an LLM-driven multi-agent reflective collaboration framework to convert Android XML layouts into HarmonyOS ArkUI layouts. It not only maps component-level and page-level elements to ArkUI equivalents but also handles project-level challenges, including complex layouts and interaction logic. Our evaluation of six Android applications demonstrates that our UITrans achieves translation success rates of over 90.1%, 89.3%, and 89.2% at the component, page, and project levels, respectively. UITrans is available at https://github.com/OpenSELab/UITrans and the demo video can be viewed at https://www.youtube.com/watch?v=iqKOSmCnJG0.

UITrans: Seamless UI Translation from Android to HarmonyOS

TL;DR

UITrans tackles cross-platform UI translation from Android to HarmonyOS ArkUI. It introduces an LLM-driven multi-agent reflective collaboration framework with Retrieval-Augmented Generation to map Android XML layouts to ArkUI components and to reason about complex layouts and interaction logic. The pipeline includes Android project parsing, translation task planning, minimal unit generation with domain knowledge and reflective re-generation, and dependency assembly to produce a complete HarmonyOS project. Evaluation on six open-source applications yields component, page, and project success rates above 89%, demonstrating practical feasibility; the authors also provide a public online service and benchmarks for Android-to-HarmonyOS UI translation.

Abstract

Seamless user interface (i.e., UI) translation has emerged as a pivotal technique for modern mobile developers, addressing the challenge of developing separate UI applications for Android and HarmonyOS platforms due to fundamental differences in layout structures and development paradigms. In this paper, we present UITrans, the first automated UI translation tool designed for Android to HarmonyOS. UITrans leverages an LLM-driven multi-agent reflective collaboration framework to convert Android XML layouts into HarmonyOS ArkUI layouts. It not only maps component-level and page-level elements to ArkUI equivalents but also handles project-level challenges, including complex layouts and interaction logic. Our evaluation of six Android applications demonstrates that our UITrans achieves translation success rates of over 90.1%, 89.3%, and 89.2% at the component, page, and project levels, respectively. UITrans is available at https://github.com/OpenSELab/UITrans and the demo video can be viewed at https://www.youtube.com/watch?v=iqKOSmCnJG0.

Paper Structure

This paper contains 12 sections, 3 equations, 3 figures, 2 tables.

Figures (3)

  • Figure 1: An example of differences between Android XML and ArkUI.
  • Figure 2: The architecture of UITrans.
  • Figure 3: An example of dictionary entry.