EasyliteOrm


Source link: https://github.com/mdennis10/EasyLite-Orm

EasyliteORM

Very simple Object Relationship Mapping framework (ORM) for Android.

Features

  • Very minimal configuration.
  • Annotation driven data modeling
  • POJO Entity Classes that are loosely coupled
  • Use of Data Access Objects for CRUD operations
  • Asynchronous Operations

##Installation ####Gradle

compile 'com.easyliteorm:easyliteorm:1.2.0' 

####Maven

<dependency>
<groupId>com.easyliteorm</groupId>
<artifactId>easyliteorm</artifactId>
<version>1.2.0</version> </dependency>

##Basic Setup #####Configuration Add information about datababse to AndroidManifest.xml

<application>
  <meta-data android:name="DATABASE" android:value="dbname.db" />
  <meta-data android:name="VERSION" android:value="1" />
  <meta-data android:name="MODEL_PACKAGE_NAME" android:value="com.somepackagename.model" /> </application>

Define Entity Model

@Entity public class Note {
  @Id(strategy = GenerationType.AUTO)  public int id;  public String body;  public String author; 
}
 

#####Usage Get singleton instance of EasyLite to create Data Access Object (DAO)

Dao<Integer, Note> dao = EasyLite.getInstance(context)

 .getDao(Note.class);
 Note note = new Note ();
 dao.create(note);
 List<Note> notes = dao.findAll();

#####Asynchronous Operation version 1.2.0 and greater

dao.findAllAsync(new ResponseListener<List<Note>>() {

 @Override
 public void onComplete(List<Note> result) {

  // do something with result
 
}

}
);

###License The MIT License (MIT)

Copyright (c) 2015 Mario Dennis

http://www.opensource.org/licenses/mit-license.php

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Get Started with EasyliteOrm!

Resources

The TileView widget is a subclass of ViewGroup that provides a mechanism to asynchronously display tile-based images, with additional functionality for 2D dragging, flinging, pinch or double-tap to zoom, adding overlaying Views (markers), built-in Hot Spot support, dynamic path drawing, multiple levels of detail, and support for any relative positioning or coordinate system.

FlowLayout is an opensource Android library that allows developers to easily integrate flow layout into their app. FlowLayout is an layout that display its children in multiple rows depending on their size.

An Android Parallax ListView item (this effect inspired by sound cloud android app).

Android comes with a few "wrapper" classes, like CursorWrapper, that make it relatively easy for you to add just a bit of functionality to an existing object. The wrapper delegates all behaviors to the wrapped object; you just override the specific behaviors you need. This works well in cases where there are many possible underlying implementations, so you could not robustly accomplish these ends by subclassing.

Android lacks such a wrapper for ListAdapter, though. There is a WrappedListAdapter entry in the SDK, but it is an interface, not an implementation.

So, CWAC offers an AdapterWrapper to fill this void.

Sometimes, you want your users to pick a color. A simple approach is to give the user a fixed roster of a handful of colors -- easy, but limited. A fancy approach is to use some form of color wheel, but these can be difficult to use on a touchscreen and perhaps impossible without a touchscreen.

ColorMixer is a widget that provides a simple set of SeekBars to let the user mix red, green, and blue to pick an arbitrary color. It is not very big, so it is easy to fit on a form, and it is still fairly finger-friendly.

It is also packaged as a dialog (ColorMixerDialog), a dialog-themed activity (ColorMixerActivity), and a preference (ColorPreference).

This project has a handful of Android containers (ViewGroup implementations) designed to handle specific scenarios:

  • AspectLockedFrameLayout that resizes itself, and its children, to fit within a specific aspect ratio
  • MirroringFrameLayout and an associated Mirror that duplicates and scales the contents of the MirroringFrameLayout onto the Mirror

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