'Is it possible to make the label attribute flexible in Navigation Component?

<fragment
    android:id="@+id/navigationMain_fragment_profileFragment"
    android:name="com.test.fragments.ProfileFragment"
    android:label="luq281"
    tools:layout="@layout/fragment_profile">

    <argument
        android:name="userId"
        app:argType="integer" />

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

</fragment>

Is it possible to make the label attribute read the value from specific arguments such as the username argument?

I know how can I do it programmatically but I want to do it in XML itself.

Is it possible or not?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source