简体   繁体   English

ListView的片段到另一个listview

[英]ListView in fragment to another listview

I'm trying to make a fragment consist of a listView 我正在尝试使一个片段由listView组成

And when I click the listView's item, it would go to another listview 当我单击listView的项目时,它将转到另一个listview

but if I use fragment with "replace" method 但是如果我将片段与“替换”方法一起使用

I cannot go back to the previous listview 我无法返回上一个列表视图

And I just can't use Activity to Activity because the fragments are in the NavigationDrawer 而且我只是不能使用Activity到Activity,因为这些片段在NavigationDrawer中

Can someone tell me how to do that? 有人可以告诉我该怎么做吗?

I think this solution could fix your problem. 我认为此解决方案可以解决您的问题。 it's kinda similar problem to handle back button inside fragment Android Fragment handle back button press 在片段Android中处理后退按钮有点类似的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM