How to write an Android multi-pane app with very deep navigation

前端 未结 3 807
感情败类
感情败类 2020-12-13 22:30

TL;DR: How should multi-pane apps with deep navigation similar to the Spotify iPad app look and work on Android, and how to implement this?

3条回答
  •  死守一世寂寞
    2020-12-13 23:24

    We ran into the same problem with our app. The constraints we gave ourselves:

    • Dynamic numbers of panes
    • Each pane can be differently sized
    • Fragments inside of panes must be correctly retained on orientation changes.

    In light of those constraints, we built a new layout we call PanesLayout. You can check it out here:

    https://github.com/cricklet/Android-PanesLibrary

    It basically allows you to easily add any number of dynamically sized panes and attach fragments to those panes. Hope you find it useful! :)

提交回复
热议问题