Android – best practice: navigation drawer

In the Android development tutorial of the navigation drawer design pattern, the recommended way to manage different layouts is to use fragments. These fragments are exchanged through the fragmenttransaction(). Replace() transaction. In my opinion, navigation drawer fragments are usually exchanged and reloaded repeatedly. Therefore, fragmenttransaction. Show() and fragmenttransaction. Hide() are used in this context Is calling more meaningful?

What are the best practices for using navigationdrawer now?

resolvent:

Yes, they load repeatedly, just like activities

The best practice is what Google publishes: fragmenttransaction. Replace() because:

>They know what they are doing ^ ^ > it loads only one fragment at a time

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>