I have a Fragment in a FragmentContainerView, and want to send send some parameters to it. Can I do this in layout xml file?
The xml maybe like:
<androidx.fragment.app.FragmentContainerView
android:name="com.myapp.TestFragment"
tools:layout="@layout/fragment_test"
hello="world"/>
then the Java code:
public class TestFragment extends Fragment {
public void onCreateView(...) {
getTheValue("hello"); // get "world" here.
}
}