This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Pink Colors --> | |
<color name="pink_50">#FCE4EC</color> | |
<color name="pink_100">#F8BBD0</color> | |
<color name="pink_200">#F48FB1</color> | |
<color name="pink_300">#F06292</color> | |
<color name="pink_400">#EC407A</color> | |
<color name="pink_500">#E91E63</color> | |
<color name="pink_600">#D81B60</color> | |
<color name="pink_700">#C2185B</color> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.appstr.bruhusrs.data | |
import android.content.Context | |
import androidx.room.Database | |
import androidx.room.Room | |
import androidx.room.RoomDatabase | |
import com.appstr.bruhusrs.singleton.SingletonHolder | |
import com.appstr.bruhusrs.util.DATABASE_NAME | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PACKAGE | |
open class SingletonHolder<out T: Any, in A>(creator: (A) -> T) { | |
private var creator: ((A) -> T)? = creator | |
@Volatile private var instance: T? = null | |
fun getInstance(arg: A): T { | |
val i = instance | |
if (i != null) { | |
return i |