Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening the Inbox Fragment using NavGraph, not using passed in Arguments #710

Open
wlynnlt opened this issue Mar 11, 2024 · 0 comments
Open

Comments

@wlynnlt
Copy link

wlynnlt commented Mar 11, 2024

using this code for the navgraph

<fragment
    android:id="@+id/inboxFragment"
    android:name="com.iterable.iterableapi.ui.inbox.IterableInboxMessageFragment"
    android:label="Inbox">

    <argument
        android:name="noMessagesTitle"
        app:argType="string" />

    <argument
        android:name="noMessagesBody"
        app:argType="string" />

</fragment>

and launching the inbox like this
inboxFragment(noMessagesBody = "no messages", noMessagesTitle = "no title body"))

The arguments are not used by the fragment.
But using the arguments like

 var bundle = Bundle()
    bundle.putString(IterableConstants.NO_MESSAGES_TITLE,"No saved messages")
    bundle.putString(IterableConstants.NO_MESSAGES_BODY, "Check again later!")
    val fragment: Fragment = instantiate(  requireContext()  , IterableInboxFragment::class.java.name, bundle)
    
    The fragment is opened and the custom text is rendered.
    Please let me know if I am using the navGraph code wrong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant