Kolumbus


Source link: https://github.com/MGaetan89/Kolumbus

Kolumbus

Kolumbus allows you to explore your Realm database from within your Android application.

Note: This library is still under heavy development and a lot of improvements has to done. It was made available to collect feedbacks and feature requests.

Screenshots

Installation

In your root build.gradle file, add the Jitpack url to the list of repositories, if you don't have it yet:

allprojects {

  repositories {

maven {

 url "https://jitpack.io"

}

  
}
 
}

In your module build.gradle file, add the Kolumbus dependency:

dependencies {

  compile 'com.github.MGaetan89.Kolumbus:kolumbus:v0.9' 
}

If you only want to use Kolumbus in your debug build, you can use the following configuration instead:

dependencies {

  debugCompile 'com.github.MGaetan89.Kolumbus:kolumbus:v0.9'
  releaseCompile 'com.github.MGaetan89.Kolumbus:kolumbus-no-op:v0.9' 
}

Usage

Check the demo application to see how to use Kolumbus.

The following example assumes that you have two classes named Category and Product in your project, which both inherits from io.realm.RealmModel.

// Kotlin import io.kolumbus.Kolumbus import io.kolumbus.KolumbusModule import io.realm.Realm import io.realm.RealmConfiguration  // Register the Kolumbus module when defining your Realm configuration val realmConfiguration = RealmConfiguration.Builder(context)
  .modules(KolumbusModule())
  .build() Realm.setDefaultConfiguration(realmConfiguration)  // Configure Kolumbus Kolumbus.explore(Category::class.java)
  .explore(Product::class.java)
  .navigate(context)
// Java import io.kolumbus.Kolumbus; import io.kolumbus.KolumbusModule; import io.realm.Realm; import io.realm.RealmConfiguration;  // Register the Kolumbus module when defining your Realm configuration RealmConfiguration realmConfiguration = new RealmConfiguration.Builder(context)
  .modules(new KolumbusModule())
  .build();
 Realm.setDefaultConfiguration(realmConfiguration);
  // Configure Kolumbus Kolumbus.build()
  .explore(Category.class)
  .explore(Product.class)
  .navigate(context);

Customization

Override resources

One way to customize the behavior/display of Kolumbus is to override the public resources in your application.

Create a custom Architect

Kolumbus provides a basic way to customize how the content of a table is displayed. To use this feature, you have to extends from Architect and override the desired methods.

// Kotlin import android.widget.TextView import io.kolumbus.Architect  class MyArchitect: Architect() {

  override fun displayEmpty(textView: TextView) {

textView.text = "Field is empty"
  
}
 
}
// Java import android.widget.TextView; import io.kolumbus.Architect;  public class MyArchitect extends Architect {

  @Override
  public void displayEmpty(@NonNull TextView textView) {

textView.setText("Field is empty")
  
}
 
}

Then, you need to pass an instance of your Architect to Kolumbus, as follow:

// Kotlin import io.kolumbus.Kolumbus  Kolumbus
  // All `explore()` calls you might need
  .withArchitect(MyArchitect())
  .navigate(context)
// Java import io.kolumbus.Kolumbus;  Kolumbus.build()
  // All `explore()` calls you might need
  .withArchitect(new MyArchitect())
  .navigate(context)

Compatibility

The following table presents the compatibility matrix between Kolumbus versions and Realm versions.

Kolumbus version Realm version
SNAPSHOT 2.0.0 - 2.0.2
0.9 1.0.0 - 1.0.1
0.7 - 0.8 0.89.0 - 1.0.0
0.5 - 0.6 0.88.0 - 0.88.3
0.1 - 0.4 ? - 0.87.5

TODO

In no particular order:

  • Sort the content of the displayed table
  • Filter the fields that are displayed
  • Filter the data that are displayed

License

Copyright 2016 MGaetan89  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

Simple random data generator for Android.

Easy to detect android emulator.

Implementation of the multiple back stacks. Using this library allows implementation of persistent bottom navigation like in Instagram.

Folio is a Page based navigation framework for Android with a simplified lifecycle and easy transition animations.

Navigator is a library allows you easily develop an Android application which only navigated by Fragments.

Yet Another View Animation (a simple and elegant view animation library for Android).

This library helps you convert any curve into ready-to-use Interpolator or TypeEvaluator, with 30 Rovert Penner's Easing Functions included.

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