MasterDetail like behaviour

I want to manage a list of items. Those items are grouped into locations. So I have a list of locations to choose from and a filtered list of items to show for each location. The behaviour of the MasterDetailPage would have been perfect for it with the locations as master and the items as detail, but I had problems with the rest of the navigation, since that page would not be my root. As far as I understand now the MasterDetailPage only works right as root navigation.

What would be considered best practice for something like this to also have a behaviour adapted to phone or tablet usage? Do I have to create two different navigation paths for tablet and phone or is there a way to achieve something like the MasterDetailPage within a different navigation structure?

Best Answer

Answers

  • JohnHardmanJohnHardman GBUniversity mod
    edited February 13

    @MartinLeist said:
    What would be considered best practice for something like this to also have a behaviour adapted to phone or tablet usage? Do I have to create two different navigation paths for tablet and phone

    If you decide to go down the route of implementing your own Master/Detail type UI, don't switch views based on tablet vs. phone using Device.Idiom. If your choice of UI appearance depends on how much space is available, test for that directly. If your choice of UI depends on whether the device hardware has support for particular things, test for those directly. Doing that makes your app cope with the multitude of different devices that are available. I tested my current app on TV for the first time last week. Other than having to add a little metadata to an Android Activity, everything else just worked. That wouldn't have been the case if I used Device.Idiom to switch UIs or functionalities. Device.Idiom reports Android TVs as being phones, not even tablets.

  • MartinLeistMartinLeist USMember ✭✭

    Thanks John for the tipps. I will keep that in mind when adapting to the capabilities of the device the app runs on.

    I looked into the navigation-drawer and it seems to be exactly what I'm looking for. Thank you.

Sign In or Register to comment.