Skip to content

Unresolved reference IScreenCreator when using screen module  #10

Description

@p4block

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions