Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 8 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,46 @@
## 4.1.0 (2021-06-16)


### Enhancements
* Releases are now found on `mavenCentral()` instead of `jcenter()`.


## 4.0.0 (2020-01-17)

## Breaking Changes

* Upgraded dependecies to AndroidX.


## 3.1.0 (2018-11-16)

### Enhancements

* Added `RealmRecyclerViewAdapter.dataOffset()` which adds support for header elements not managed by the Realm collection. Thank you @trr-amsiq. [#153](https://github.com/realm/realm-android-adapters/pull/153)


## 3.0.0 (2018-04-06)

### Breaking Changes

Only works with Realm Java 5.0.0+.
* Only works with Realm Java 5.0.0+.

### Bug Fixes

* `RealmRecyclerViewAdapter.getItem(index)` now returns `null` instead of crashing if index is out range, e.g. if footer views are added (#141)

### Credits

* Thanks to @yasiralijaved for fixing Footer view support in `RealmRecyclerViewAdapter.getItem(index)`.


## 2.1.1 (2017-11-10)

### Bug fixes

* `getItemId(int)` returned the item index instead of `NO_ID` as the default implementation (#132).


## 2.1.0 (2017-05-16)

### Bug fixes

* Now `RealmBaseAdapter` behaves as empty if the `adapterData` is not valid (#112).

### Enhancements

* Added `updateOnModification` to `RealmRecyclerViewAdapter` constructor (#107).


Expand All @@ -50,7 +49,6 @@ Only works with Realm Java 5.0.0+.
Works with Realm Java 3.x.

### Breaking changes

* Removed `RealmBaseAdapter(@Nonnull Context context, @Nullable OrderedRealmCollection<T> data)`.
* Removed `RealmRecyclerViewAdapter(@NonNull Context context, @Nullable OrderedRealmCollection<T> data, boolean autoUpdate)`.
* Removed `RealmBaseAdapter.inflater`.
Expand All @@ -59,91 +57,76 @@ Works with Realm Java 3.x.
* Removed `RealmRecyclerViewAdapter.contex`.

### Enhancements

* Added fine grained notification support to `RealmRecyclerViewAdapter`.


## 1.5.0

### Deprecated

* `RealmBaseAdapter(@Nonnull Context context, @Nullable OrderedRealmCollection<T> data)`
use `RealmBaseAdapter(@Nullable OrderedRealmCollection<T> data)` instead

* `RealmRecyclerViewAdapter(@NonNull Context context, @Nullable OrderedRealmCollection<T> data, boolean autoUpdate)`
use `RealmRecyclerViewAdapter(@Nullable OrderedRealmCollection<T> data, boolean autoUpdate)` instead.

### Credits

* Thanks to Bhargav Mogra (@bhargavms) for identifying the unnecessary dependency on context and cleaning up.


## 1.4.1

### Bug fixes

* Fixed crash of `RealmRecyclerViewAdapter#updateData()` when the `adapterData` in it was already invalid (#58).


## 1.4.0

### Enhancements

* Removed transitive dependency to realm-android-library in order to support realm-android-library-object-server.


## 1.3.0

### Enhancements

* Added Android Support Annotations for all public adapter methods.

### Credits

* Lars Grefer (@larsgrefer) for adding the support annotations.


## 1.2.2

### Bug fixes

* `RealmRecyclerViewAdapter` uses RealmModel instead of RealmObject (#29).


## 1.2.1

### Bug fixes

* Fixed crash when auto-updating RealmResults (#25).


## 1.2.0

### Enhancements

* Removed `appcompat-v7` from the library dependencies list.


## 1.1.0

### Enhancements

* `RealmRecyclerViewAdapter`, a new adapter base class for `RecyclerView`s.

### Bug fixes

* Removed `allowBackup` and `supportsRtl` from the Android manifest file.

### Credits

* Paweł Surówka (@thesurix) for adding the `RealmRecyclerViewAdapter`.
* Mitchell Tilbrook (@marukami) for cleaning up `AndroidManifest.xml`.`


## 1.0.1

### Bug fixes

* Javadoc and sources are now properly distributed as well.
* RealmBaseAdapter: Fixed listeners potentially leaking when using a RealmResults.

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ RUN sdkmanager --update
# Accept all licenses
RUN yes y | sdkmanager --licenses
RUN sdkmanager 'platform-tools'
RUN sdkmanager 'build-tools;26.0.2'
RUN sdkmanager 'build-tools;30.0.3'
RUN sdkmanager 'extras;android;m2repository'
RUN sdkmanager 'platforms;android-26'
RUN sdkmanager 'platforms;android-30'

# Make the SDK universally writable
RUN chmod -R a+rwX ${ANDROID_HOME}
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ try {
buildEnv.inside("-e HOME=/tmp -e _JAVA_OPTIONS=-Duser.home=/tmp --privileged -v /dev/bus/usb:/dev/bus/usb -v ${env.HOME}/gradle-cache:/tmp/.gradle -v ${env.HOME}/.android:/tmp/.android -v ${env.HOME}/ccache:/tmp/.ccache") {
stage('Build & Test') {
try {
gradle 'assemble javadoc check connectedCheck'
gradle 'assemble javadoc check spotbugMain pmd checkstyle connectedCheck'
if (env.BRANCH_NAME == 'master') {
stage('Collect metrics') {
collectAarMetrics()
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Realm is a mobile database that runs directly inside phones, tablets or wearables.

This repository holds adapters for combining Realm Java with Android UI components and framework classes.
This repository holds adapters for combining [realm-java](https://github.com/realm/realm-java) (the Realm Java SDK for Android) with Android UI components and framework classes.

Currently supported UI components are:

Expand All @@ -11,27 +11,29 @@ Currently supported UI components are:

## Getting Started

This library only works together with Realm Java. Please see the [detailed instructions in our docs](https://realm.io/docs/java/#installation)
to add Realm to your project.
This library only works together with the Realm Android SDK. Please see the
[detailed instructions in our docs](https://docs.mongodb.com/realm/sdk/android/examples/adapters/)
for using this library.

To add the adapters to your project, add the following to you app's dependencies:

```
repositories {
jcenter()
mavenCentral()
}

dependencies {
compile 'io.realm:android-adapters:3.1.0'
compile 'io.realm:android-adapters:4.1.0'
}
```

This library is only compatible with Realm Java 3.0.0 and above.
This library is only compatible with `realm-java` (the Realm Android SDK) 5.0.0 and above.

## Documentation

Documentation for Realm can be found at [realm.io/docs/java](https://realm.io/docs/java).
The API reference is located at [realm.io/docs/java/api](https://realm.io/docs/java/api).
Documentation for Realm can be found at [docs.mongodb.com/realm/](https://docs.mongodb.com/realm/).
The Realm SDK documentation can be found at [docs.mongodb.com/realm/sdk/android/](https://docs.mongodb.com/realm/sdk/android/).
The API reference is located at [docs.mongodb.com/realm-sdks/java/latest/](https://docs.mongodb.com/realm-sdks/java/latest/).

## Getting Help

Expand Down Expand Up @@ -64,24 +66,24 @@ In case you don't want to use the pre-compiled version, you can build the librar

Prerequisites:

* Download/the [**JDK 7**](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) or [**JDK 8**](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) from Oracle and install it.
* Download [**JDK 7**](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) or [**JDK 8**](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and install it.
* Download & install the Android SDK, **Android 7.1 (API 25)** (for example through Android Studio’s **Android SDK Manager**)

Once you have completed all the pre-requisites building Realm is done with a simple command
Once you have completed all the pre-requisites building the adapter library is done with a single command:

```
./gradlew assemble
```

That command will generate:

* an aar file for the adapter library in `adapters/build/outputs/aar/android-adapters-release.aar`
* an `aar` file for the adapter library (`adapters/build/outputs/aar/android-adapters-release.aar`)

### Other Commands

* `./gradlew monkeyDebug` will run the monkey tests on the example project.
* `./gradlew javadoc` will create the javadoc for the library.
* `./gradlew artifactoryPublish` will upload a SNAPSHOT to OJO.
* `./gradlew publishToSonatype` will upload artifacts to Maven Central.
* `./gradlew bintrayUpload` will upload a release to Bintray.

## Contributing
Expand All @@ -102,4 +104,4 @@ Realm Android Adapters is published under the Apache 2.0 license.

**_And if you don't like it, please let us know what you would like improved, so we can fix it!_**

![analytics](https://ga-beacon.appspot.com/UA-50247013-2/realm-android-adapters/README?pixel)
![analytics](https://ga-beacon.appspot.com/UA-50247013-2/realm-android-adapters/README?pixel)
Loading