Skip to content

How to initialize LocalServiceConnection from a fragment #149

@ndarilek

Description

@ndarilek

I have code like:

class MapFragment extends Fragment with Contexts[Fragment] with SharedPreferences.OnSharedPreferenceChangeListener {

  implicit var ctx:Context = _

  override def onActivate(a:Activity) {
    ctx = a
    val locationService = new LocalServiceConnection[LocationService]
    locationService.onConnected {
...

But I get:

/home/nolan/Projects/Hermes/src/main/scala/android/ui.scala:371: could not find implicit value for parameter reg: org.scaloid.common.Registerable
Error occurred in an application involving default arguments.
    val locationService = new LocalServiceConnection[LocationService]
                          ^

How do I make this custom Fragment a Registerable?

Thanks.

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