KO
|
EN
gitlite โ search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
RealmHelper
โ 12
Open GitHub โ
Realm helper by Kotlin
Download README (.md)
Explore Similar Repositories
Billboard
:
๐
ng-lazy-load
:
Lazy loading images with Angular.
password_manager
:
Military-Grade Password Manager
ACS-VRP
:
This is a project using Ant Colony System to vehicle routing problem.
elastic-grok-script-plugin
:
Elastic-Grok-Script-Plugin is a provider of Grok ElasticSearch plug-in
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
RealmHelper
?
Download (.md)
# Realm helper by Kotlin ---- Realm helper is aim to simplify realm database use . The realm of Android version still have some troublesome problems, such as: * You must remember to call close method in onDestroy method of activity or fragment * It canโt call each other betweeten threads For problem one, Realm helper has provided a solution. It can use realm database more easily , and help you to auto close realm in onDestroy method. <pre> class MainActivity : AppCompatActivity() { private var mRealmHelper: RealmHelper by Delegates.notNull<RealmHelper>() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) // You must ensure activity has been created mRealmHelper = RealmHelper.get(this) // You can use all method in Realm class at here mRealmHelper.use { executeTransaction { } } } } </pre> Watch more, checkout this project , see app module. In the project , it adds a child project **LifecycleBinder**, You can easily to achieve binding lifecycle of activity and fragment by using **LifecycleBinder** . It inspired by [Glide](https://github.com/bumptech/glide) For problem two, it still have not a good solution , you must be carefull when call in multiple threads This project will keep updating, if you find some other troublesome problem, just send email: [ouyangfeng2016@gmail.com]() to me # About me **็ฌๅ**: ๆฌง้ณ้ **็ฑๅฅฝ**: ็ผ็จ,ๆ ๆธธ,่ฟๅจ **ๆ ้ฟ**: Android/iOS/Java Web/C++/Kotlin **็ฎไนฆ**: [ๅ ณๆณจๆ็็ฎไนฆ](http://www.jianshu.com/users/db019edd34b4/latest_articles) **็ญพๅ**: ๅไธไธชๆ็ๆณ็็จๅบๅ **iOSไบคๆต็พค**: 468167089 **Kotlinไบคๆต็พค**: 329673958 **ๅๆฌข็ผ็จ็ๅๅญฆ,ๅซๅฟไบๅ ณๆณจๆ็็ฎไนฆๅฆ!**