Package 

Class LineItemDetailsFragment

  • All Implemented Interfaces:
    android.content.ComponentCallbacks , android.view.View.OnCreateContextMenuListener , androidx.activity.result.ActivityResultCaller , androidx.lifecycle.HasDefaultViewModelProviderFactory , androidx.lifecycle.LifecycleOwner , androidx.lifecycle.ViewModelStoreOwner , androidx.savedstate.SavedStateRegistryOwner , net.gini.android.bank.sdk.capture.digitalinvoice.details.LineItemDetailsFragmentInterface , net.gini.android.bank.sdk.capture.digitalinvoice.details.LineItemDetailsScreenContract.View , net.gini.android.capture.GiniCaptureBaseView

    
    public final class LineItemDetailsFragment
    extends Fragment implements LineItemDetailsScreenContract.View, LineItemDetailsFragmentInterface
                        

    When you use the Component API the LineItemDetailsFragment displays a line item to be edited by the user. The user can modify the following:

    • deselect the line item,

    • edit the line item description,

    • edit the quantity,

    • edit the price.

    The returned line item in the LineItemDetailsFragmentListener.onSave() is updated to contain the user's modifications.

    You should show the LineItemDetailsFragment when the DigitalInvoiceFragmentListener.onEditLineItem() is called.

    Include the LineItemDetailsFragment into your layout by using the LineItemDetailsFragment.createInstance() factory method to create an instance and display it using the androidx.fragment.app.FragmentManager.

    A LineItemDetailsFragmentListener instance must be available before the LineItemDetailsFragment is attached to an activity. Failing to do so will throw an exception. The listener instance can be provided either implicitly by making the hosting Activity implement the LineItemDetailsFragmentListener interface or explicitly by setting the listener using LineItemDetailsFragment.listener.

    Your Activity is automatically set as the listener in LineItemDetailsFragment.onCreate().

    See the LineItemDetailsActivity for details.