Embedding in layout.xml file

Once this code is added to the view file, you can access this in the onCreate method of your Activity. The Fragment can be initialized in different ways. Each of these ways is explained in the upcoming sections.

<fragment android:name="in.juspay.godel.ui.JuspayBrowserFragment"
    android:id="@+id/juspay_browser_fragment"
    android:layout_width="fill_parent"
    android:layout_height="match_parent" />

When embedding the Fragment directly in view file, you can pass the bundle by using the method JuspayBrowserFragment#startPaymentWithArguments.

JuspayBrowserFragment browserFragment = (JuspayBrowserFragment) getSupportFragmentManager().findFragmentById(R.id.juspay_browser_fragment);
browserFragment.startPaymentWithArguments(initBundle);

Here initBundle contains the key-value pairs as stated in above sections.

results matching ""

    No results matching ""