50

How should I pass in null as default value for a String argument such as this:

<argument
    android:name="profile_id"
    android:defaultValue="???"
    app:argType="string"
    app:nullable="true" />

If the argument is nullable there should be a way to pass in null right?

Kayvan N
  • 8,108
  • 6
  • 29
  • 38

1 Answers1

113

Turns out the good old @null works

<argument
    android:name="profile_id"
    android:defaultValue="@null"
    app:argType="string"
    app:nullable="true" />
Kayvan N
  • 8,108
  • 6
  • 29
  • 38