QuantumFlux


Source link: https://github.com/himanshu-soni/QuantumFlux

QuantumFlux

A Powerful Android Content Provider ORM. It uses Content Providers to access the data and internally uses SQLite to actually store the data. It can be used as a typical ORM, by creating Java objects and applying some Annotations and/or by extending QuantumFluxRecord on them and they will be accessed normally and creates ContentProvider.

For more information in detail, please check Wiki page.

Features

  1. Create table from data modal objects, either by annotation or by extending QuantumFluxRecord.
  2. Create table view from data modal.
  3. Advanced query creation using QueryBuilder, complex queries can be created very easily.
  4. Supports many common data types as Date, Calender, UUID, BigDecimal, and also allows custom column type mappings.
  5. Table change listeners for views to auto reflect data changes.
  6. Very easy to setup, use and query.

Installation

Gradle (Recommended)

add following line to your module's dependency list:

compile 'me.himanshusoni:quantum-flux:0.9.3' 

Maven

Declare the dependency in Maven:

<dependency>
<groupId>me.himanshusoni</groupId>
<artifactId>quantum-flux</artifactId>
<version>0.9.3</version>
<type>pom</type> </dependency> 

For eclipse users

You can also download the source and import as library project.

or add jar

See releases page to download jar for latest version directly.

===================

Basic Usage

  1. Install the project via any of the method above. and extend Application class and use it as following:

    public class SampleApplication extends Application {
    
      @Override
      protected void attachBaseContext(Context base) {
    
    super.attachBaseContext(base);
    
    QuantumFlux.initialize(this);
    
      
    }
     
    }
     
  2. register this application class in Manifest file:

    <application
    
    android:name="me.himanshusoni.quantumflux.sample.SampleApplication"
    
    ...
    
    >
  3. add following meta data in <application> tag

    <meta-data android:name="AUTHORITY" android:value="me.himanshusoni.quantumflux.sample" /> <meta-data android:name="DATABASE_NAME" android:value="QuantumFluxSample.sqlite" /> <meta-data android:name="DATABASE_VERSION" android:value="1" /> <meta-data android:name="PACKAGE_NAME" android:value="me.himanshusoni.quantumflux.sample" /> <meta-data android:name="QUERY_LOG" android:value="true" /> <!-- Optional -->
  4. register content provider:

    <provider
      android:name="me.himanshusoni.quantumflux.provider.QuantumFluxContentProvider"
      android:authorities="me.himanshusoni.quantumflux.sample"
      android:exported="false" />
  5. Now, you just have to create modal classes by:

    • annotation:

      @Table public class Book {
       ... 
      }
       
    • extending class:

      public class Author extends QuantumFluxRecord<Author> {
      
        public String name;
        ... 
      }
       
  6. Access:

    Book book = new Book();
     book.name = "Sorcerer's Stone"; book.isbn = "122342564"; QuantumFlux.insert(book);
     
    Author author = new Author();
     author.name = "J.K. Rollings"; author.save();
     
    Author first = Select.from(Author.class).first();
     first.name = "J. K. Rowling"; first.update();
     
    QuantumFlux.deleteAll(Book.class);
     Author first = Select.from(Author.class).first();
     first.delete();
     

=========================

For detailed configuration and advance usages, go through https://github.com/himanshu-soni/QuantumFlux/wiki

Inspired from https://github.com/wackymax/CPOrm and https://github.com/satyan/sugar

Special thanks to Satya Narayan (@satyan) and Hennie Brink (@Wackymax).

developed to make programming easy.

by Himanshu Soni ( [email protected])

Resources

Simply pass a url to play youtube video on new activity. It supports screen orientation, media volume control and etc.

The design goals of this project are as follows:

  • Provide an on-device view of explicit log output during app development.
  • Do not disrupt the normal lifecycle of the app (no app switching).
  • Transparent implementation (using the same API as android.util.Log, easily disabled).
  • Minimal setup.

Android simple listview by using linearlayout. Behavior is the same except no scrollable, thus you can use it freely in scrollview. It is very basic implementation, you should not use for the huge list.

Paginize is a light-weight application framework for Android.

An ImageView that supports different kind of cropping rather than the only Android is currently supporting: centerCrop

Using this library, you can crop your desired image by sides described below:

Small library that provides Foreground View functionality to most used Android Views with foreground.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes