Convert MarkdownApplication to Kotlin
This commit is contained in:
parent
0b9eb26b4a
commit
e00d43f93c
2 changed files with 16 additions and 20 deletions
|
@ -1,20 +0,0 @@
|
|||
package com.wbrawner.simplemarkdown;
|
||||
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
public class MarkdownApplication extends MultiDexApplication {
|
||||
|
||||
private AppComponent component;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
component = DaggerAppComponent.builder()
|
||||
.context(this)
|
||||
.build();
|
||||
}
|
||||
|
||||
public AppComponent getComponent() {
|
||||
return component;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.wbrawner.simplemarkdown
|
||||
|
||||
import android.app.Application
|
||||
|
||||
class MarkdownApplication : Application() {
|
||||
|
||||
lateinit var component: AppComponent
|
||||
private set
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
component = DaggerAppComponent.builder()
|
||||
.context(this)
|
||||
.build()
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue