Step #6: Creating an Empty Layout
As was the case with DisplayFragment
, to have EditFragment
show the contents of a ToDoModel
and allow editing, it helps to have a layout resource.
Right-click over the res/layout/
directory and choose “New” > “Layout resource file” from the context menu. In the dialog that appears, fill in todo_edit
as the “File name” and ensure that the “Root element” is set to androidx.constraintlayout.widget.ConstraintLayout
. Then, click “OK” to close the dialog and create the mostly-empty resource file.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.