Changes

Jump to: navigation, search

A Kotlin Android Studio Master/Detail Flow Tutorial

12 bytes added, 18:35, 27 November 2017
The Anatomy of the Master/Detail Flow Template
* '''<item>_content_list.xml''' – This file contains the layout to be used for each item in the master list. By default, this consists of two TextView objects embedded in a horizontal LinearLayout but may be changed to meet specific application needs.
 * '''activity_<item>_detail.xml ''' – The top level layout file used for the detail pane when running in single-pane mode. This layout contains an app bar, collapsing toolbar, scrolling view and a floating action button. At runtime this layout file is loaded and displayed by the <item>DetailActivity class.
* '''<item>DetailActivity.kt''' – This class displays the layout defined in the activity_<item>_detail.xml file. The class also initializes and displays the fragment containing the detail content defined in the item_detail.xml and <item>DetailFragment.kt files.
* '''<item>_detail.xml ''' – The layout file that accompanies the <item>DetailFragment class and contains the layout for the content area of the detail pane. By default, this contains a single TextView object, but may be changed to meet your specific application needs. In single-pane mode, this fragment is loaded into the layout defined by the activity_<item>_detail.xml file. In two-pane mode, this layout is loaded into the FrameLayout area of the <item>_list.xml (w900dp) file so that it appears adjacent to the master list.
* '''<item>DetailFragment.kt''' – The fragment class file responsible for displaying the <item>_detail.xml layout and populating it with the content to be displayed in the detail pane. This fragment is initialized and displayed within the <item>DetailActivity.kt file to provide the content displayed within the activity_<item>_detail.xml layout for single-pane mode and the <item>_list.xml (w900dp) layout for two-pane mode.

Navigation menu