Skip to content

vishnuQtdeveloper/quickandroid

 
 

Repository files navigation

Quick Android - QML Theme and Component Library for Android

Build Status

Features

  1. Provide “DP” unit
  2. Page transition management
  3. "Back" to previous page by the hardware back button
  4. Unified “Drawable” component
  5. A single component that supports color , image , QML component, simulated nine patch image as input source
  6. Auto scale image to fit current screen resolution
  7. Derived StateListDrawable for animated drawable like button
  8. Drawable Image provider
  9. Load image resource in Android resource style. (e.g drawable-xxxhdpi)
  10. Choose the best image according to current resolution automatically.
  11. Apply a tint of color to image
  12. Theme / Style Engine
  13. A set of components with native look and feel on Android
  14. SystemDispatcher - C++ and Java communication manager.
  15. Auto conversion between C++ and Java data type. No need to write in JNI.

UI Components

ActionBar , Activity , Application , Drawable , StateListDrawable
MaterialShadow , PopupMenu , Spinner , QuickButton , 
Switch

Utility Components

Dialog , DrawableGrowBehaviour, InverseMouseArea ,  PopupArea
QueuedSignal , RectToRectMatrix , AnimationLoader ,
Overlay , Ghost

Under Development Components

SwipeViewer , NavigationDrawer

Instruction of use

  1. Clone this repository / download release and bundle the folder within your source tree.

  2. Add this line to your profile file(.pro):

    include(quickandroid/quickandroid.pri) # You should modify the path by yourself

  3. 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();
}


  1. Import the package within your QML file by :

    import QuickAndroid 0.1

Notes of using DP

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

Demonstration

An example program is available in the folder of tests/quickandroidexample . You may build it by yourself or download the daily build from drone.io .

Remarks: Daily build for non-master branch may not be working.

Screenshot

License

The license of this project has been changed to Apache License 2.0

FAQ

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:

  1. Iktwo/components
  2. rschiang/material

Q. Looking for iOS Native Component?

  1. benlau/quickios

Q. Any library for ...?

  1. Sharing
  2. bdentino/Qtino.SharingKit

About

QML Theme and Component Library for Android

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • QML 75.0%
  • C++ 15.5%
  • Java 7.6%
  • QMake 0.9%
  • Shell 0.6%
  • Prolog 0.3%
  • JavaScript 0.1%