# cdroid
**Repository Path**: houstudio/Cdroid
## Basic Information
- **Project Name**: cdroid
- **Description**: CDroid 是一套基于C++11开发的高仿安卓的跨平台GUI引擎,兼容Android Studio设计工具。设计目标针对中高端嵌入式设备,旨在为中高端设备提供媲美安卓的UI设计效果。同时也让安卓开发者能轻松切入到嵌入式开发领域。
- **Primary Language**: C++
- **License**: LGPL-2.1
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: Yes
## Statistics
- **Stars**: 152
- **Forks**: 42
- **Created**: 2021-06-16
- **Last Updated**: 2025-07-29
## Categories & Tags
**Categories**: desktop-ui
**Tags**: Qt, Android, GUI, HMI, RecyclerView
## README
# **Introduction**
**CDroid** 是一套基于C++11开发的高仿安卓的跨平台GUI引擎,设计目标针对中高端嵌入式设备.旨在为中高端设备提供媲美安卓的UI设计效果。同时也让安卓开发者能轻松切入到嵌入式开发领域。
* 运行环境:32M以上内存的嵌入式系统。
* 主仓库: [https://gitee.com/houstudio/cdroid](https://gitee.com/houstudio/cdroid)
* 镜像仓库: [https://github.com/houstudio/cdroid](https://github.com/houstudio/cdroid)
# **Features:**
* Multi Layer/Multi Window
* 集成40+ 安卓兼容的UI组件和20+ Drawables
* 所有UI组件(Layouts,Drawables...)可以在安卓兼容的开发环境(**AndroidStudio or Eclipse**)中进行设计
* 基于 **Cairo**的矢量图形引擎
# **Quick Start**
* 虚拟机体验:https://pan.baidu.com/s/1-v-rLcHxo5W5TXvJ2NUWxA 提取码:spux (虚拟机登录用户:cdroid 密码:123456)
* 登录后请重新pull cdroid更新代码
* 每次更新代码建议干掉cdroid/outXXXX 然后重走 build.sh构建流程。
# **IDE(AndroidStudio/Eclipse)**

# **ScreenShots**









# **UI Components:**
| View | TextView | Button | ImageView | ImageButton |
|---------------|-------------------|--------------------|---------------|---------------|
|CompoundButton | ToggleButton | CheckBox | RadioButton | ProgressBar |
| SeekBar | Chronometer | AnalogClock | ViewGroup | RadioGroup |
| ScrollView | ViewPager | SimpleMonthView | Switch | RatingBar |
| NumberPicker | ListView | GridView | RecyclerView | ViewFlipper |
| ViewAnimator |AdapterViewAnimator| Calendarview |SimpleMonthView| Chronometer |
| ScrollView | NestedScrollView |HorizontalScrollView| DateTimeView | ViewPager2 |
|YearPickerView | | | | |
# **Supported Layouts:**
| FrameLayout | LinearLayout | RelativeLayout | TableRow |
|-------------|----------------|----------------|------------------|
| TableLayout | AbsoluteLayout | GridLayout |GestureOverlayView|
# **Supported Drawables:**
| ColorDrawable | BitmapDrawable | NinepatchDrawable | InsetDrawable |
|-------------------|------------------|--------------------------|-----------------|
|ShapeDrawable |TransitionDrawable| AnimatedVectorDrawable |StateListDrawable|
| LevelListDrawable | ClipDrawable | AnimatedRotateDrawable | RotateDrawable |
|GradientDrawable | ScaleDrawable | AnimatedImageDrawable | VectorDrawable |
| RippleDrawable |AnimationDrawable |AnimatedStateListDrawable | LayerDrawable |
# **Porting guide:**
* 1 A new product porting should be placed to src/porting/xxx(where xxx is you chipset name)
* 2 implement your porting api to xxx directory
* 3 modify build.sh to support your port(you should configure sysroot toolchain...).
* 4 call build.sh --product=xxx
* 5 make you project(SeeAlso **Building CDROID**)
# **Building CDROID:**
### 1.install dependencs:
sudo apt install autoconf libtool build-essential cmake gdb pkg-config zip gettext libx11-dev bison python>=3.7 pip3-python python3-lxml meson
### 2.install vcpkg:
* git clone https://gitee.com/houstudio/vcpkg.git
* cd vcpkg
* ./bootstrap-vcpkg.sh
### 3.install cdroid deplibs:
* ./cdroid_install_libs.sh --triplet=x64-linux-dynamic
### 4.download cdroid source code:
* cd ~
* git clone http://www.gitee.com/houstudio/cdroid.git
### 5.build cdroid:
* cd cdroid
* ./build.sh --build=debug
* cd outX64-Debug
* make -j
### 6.prepare system and app resource
*The cdroid.pak and yourapp's pak must be in your working directory*
* cp src/gui/cdroid.pak ./
* cp apps/appname/appname.pak ./
### 7.run samples(in directory outX64-Debug
* apps/samples/helloworld
* apps/uidemo1/uidemo1