In the Android development tutorial in the navigation box design pattern, the recommended way to manage different layouts is to use fragments. These fragments are replaced by a transaction FragmentTransaction().replace(). In my opinion, fragments of the navigation box are usually exchanged and recharged. So it makes no sense to use the challenges FragmentTransaction.show()and FragmentTransaction.hide(), in this context?
FragmentTransaction().replace()
FragmentTransaction.show()
FragmentTransaction.hide()
What is the best practice to use NavigationDrawerright now?
NavigationDrawer
Yes, they are reloaded, just like actions ...
, Google : FragmentTransaction.replace(), :
FragmentTransaction.replace()
, .
.
, , actionBar , .
Now as per Android documentation as you are referring .. it is always good to have fragment as they a light weighted in context of to use new activity each time for your app.
, !
Source: https://habr.com/ru/post/1538100/More articles:Regular expression to convert raw text to data columns - regexHow to prevent "swapping" of "Staged" Azure sites from user registration? - asp.net-mvcMediaSource SourceBuffer closes after two calls to appendBuffer - javascriptSelecting multiple columns in a result set as XML - xmlRun PhoneGap FileTransfer in background thread? - javascriptInsert an attribute into multiple XML nodes using XML.modify () in SQL 2005 - xmlError 80073cf9 on a Windows 8.1 phone. - windows-phone-8Most idiomatic way to provide default value in python? - python"Task was canceled" error on Azure website - c #Iteration from 1..n or n..1 is conditional in C ++ - c ++All Articles