- Provides “DP” unit
- Page transition management
- "Back" to previous page by the hardware back button
- Unified “Drawable” component
- A single component that supports color , image , QML component , simulated nine patch image as input source
- Auto scale image to fit current screen resolution
- Derived StateListDrawable for animated drawable like button
- Theme / Style Engine
- Animation Management
- A set of components with native look and feel on Android
UI Components
ActionBar , Activity , Application , Drawable , StateListDrawable
MaterialShadow , PopupMenu , Spinner , QuickButton , QATextInput,
Switch
Utility Components
Dialog , DrawableGrowBehaviour, InverseMouseArea , PopupArea
QueuedSignal , RectToRectMatrix , AnimationLoader ,
Overlay , Ghost
Under Development Components
SwipeViewer , NavigationDrawer
- Clone this repository and bundle the folder within your source tree.
(It is recommended to use git subdmoule
to embed this repository)
-
Add this line to your profile file(.pro):
include(quickandroid/quickandroid.pri) # You should modify the path by yourself
-
Modify your main.cpp
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickView>
#include "quickandroid.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQuickView view;
/* QuickAndroid Initialization */
view.engine()->addImportPath("qrc:///"); // Add QuickAndroid into the import path
QuickAndroid::registerTypes(); // It must be called before loaded any scene
/* End of QuickAndroid Initialization */
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl(QStringLiteral("qrc:///splash.qml")));
view.show();
return app.exec();
}
-
Import the package within your QML file by :
import QuickAndroid 0.1
You may get the DP/density value from the global variable "A.dp" after you have called the QuickAndroid::RegisterTypes()
in your code. However, Qt Creator don't know the value and threfore the UI will be broken. In make it works , you have to declare a dummy data in your project. Check the example code: dummydata/A.qml
Please refer to the example program in the folder of tests/quickandroidexample
The license of this project has been changed to Apache License 2.0
Q. Looking for component that is not supported yet?
Please feel free to submit the request to the wiki. Moreover, you may take a look on other component library:
Q. Looking for iOS Native Component?
- hilarycheng/quickios (Still Under Development)