Skip to content
Dmytro Danylyk edited this page Jun 2, 2015 · 16 revisions

User Guide

Integration

The lib is available on Maven Central, you can find it with [Gradle, please]

dependencies {
    compile 'com.github.dmytrodanylyk.realm-browser:library:0.0.3'
}

Note: Realm Browser must be launched from your application

Usage

Sample below is available in sample project

Initialize Realm Browser

Add all classes which you want to see in Realm Browser using method below. Those classes must extend RealmObject.

RealmBrowser.getInstance().addRealmModel(User.class, Address.class,
                RealmString.class, Contact.class);

Database list

If you want to see all your databases launch RealmFilesActivity.

RealmFilesActivity.start(this); // this - any of your activity

Table list

If you want to see all your table list launch RealmModelsActivity.

RealmModelsActivity.start(this, "db10"); // this - any of your activity, db10 - name of database

Table data list

When you click on one of your tables you should see list of data.

Text Wrapping

By default all rows are single line, if you want to change this, click on three dot menu, go to Settings and check Wrap text inside column.

Columns to display

You can see no more then 3 columns at a time, to change which columns to display, click on three dot menu, go to Select Column, and check columns to display.

Relationships

When your row item represent list of data, e.g. User contains RealmList<Contact>. You can click on RealmList<Contact> row item to open table which will display list of Contact related to User.

Clone this wiki locally