Line Item Details Fragment
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().
Customizing the Digital Invoice Screen
See the LineItemDetailsActivity for details.