I am following the example with the built-in settings activity to build a quick prototype, but I am surely missing something pretty basic.
Here I get these errors on Android Studio, Unresolved reference: IScreenCreator and No 'Parcelable' supertype for ScreenCreator itself.
object UserSettingsModel : SettingsModel(DataStoreStorage(name = "user")) {
// main data types
val baseVideoUri by stringPref("rtsp://10.0.0.10:8554")
}
@Parcelize
object ScreenCreator : SettingsActivity.IScreenCreator {
override fun createScreen(
activity: AppCompatActivity,
savedInstanceState: Bundle?,
updateTitle: (title: String) -> Unit
): PreferenceScreen {
return screen {
state = savedInstanceState
input(UserSettingsModel.baseVideoUri) {
title = "Video URL".asText()
}
}
}
}
class MainActivity : AppCompatActivity() {
(rest of the activity)
I think I am just using it wrong, I've been looking at the example app but I didn't find anything.
In any case, thanks a lot for the library, it seems to save a lot of time when dealing with prefs. The automagic settings activity would just be the icing on the cake.
I am following the example with the built-in settings activity to build a quick prototype, but I am surely missing something pretty basic.
Here I get these errors on Android Studio, Unresolved reference: IScreenCreator and No 'Parcelable' supertype for ScreenCreator itself.
I think I am just using it wrong, I've been looking at the example app but I didn't find anything.
In any case, thanks a lot for the library, it seems to save a lot of time when dealing with prefs. The automagic settings activity would just be the icing on the cake.