问题
Java 8, min SDK: 24, target SDK: 27
My app displays a map with some type of map marker (within a Fragment
) and if I click on one of these markers, a popup comes up to show some additional information about this marker. Currently I'm using a normal AlertDialog
for that but I might replace it with a DialogFragment
in the future.
Inside the dialog there's a RecyclerView
that is filled with multiple values. If I click on one of the rows, I want my app to open a "fold-out" underneath it (the other rows should move down) that displays even more information about that row. Clicking on the row again should close that "fold-out".
Similar to what the FoldingCell library does but I want to add to the original row (instead of replacing it) and also don't need the fancy animation.
Like this:
Is "fold-out" the right word for it? I'm pretty sure I saw a similar question here on Stackoverflow (might have been for iOS) a while back but I've not been able to find it again yet. I know how to do the whole onClick
thing for the map and the RecyclerView
but how do I accomplish the "fold-out" part (create design in xml, then load via Java class)?
来源:https://stackoverflow.com/questions/61818692/fold-out-for-row-in-recyclerview