SlidingMenu icon indicating copy to clipboard operation
SlidingMenu copied to clipboard

Best use practices?

Open jtehlert opened this issue 14 years ago • 2 comments

I am using the side nav to change between parts of the app, from a unit converter to a json downloader/parser. Currently I am doing this just by changing the main view and calling functions to start the processes for each view. However this means that the views reset every time I switch between them.

What would be the best way to do this so that the view is not reset every time? Is this the purpose of fragments?

I know you're busy with school and work, but I think we could all really use an example where you switch between the activities using the side menu instead of the ExampleList

jtehlert avatar Dec 01 '12 02:12 jtehlert

This is indeed the point of Fragments. There are examples of it in the example app (http://bitly.com/TWejze) and also in this repo in the example folder. I'll try to throw a quick example of seamless Activity changing into the example when I get some free time.

See here: https://github.com/jfeinstein10/SlidingMenu/blob/master/example/src/com/slidingmenu/example/fragments/FragmentChangeActivity.java

and here: https://github.com/jfeinstein10/SlidingMenu/blob/master/example/src/com/slidingmenu/example/fragments/ResponsiveUIActivity.java

jfeinstein10 avatar Dec 01 '12 02:12 jfeinstein10

@jfeinstein10 did you ever add an example of seamless Activity changing? I'm struggling to get it perfectly...Thanks!

starkej2 avatar Mar 28 '13 18:03 starkej2