开发者

Android: How to use fragments to completely change a view

开发者 https://www.devze.com 2023-03-28 06:06 出处:网络
My app has a custom segmented control(got it from internet - its really a radio group) and under it a listview. When a user clicks on a row in the list view, a fragment is attached to the activity tha

My app has a custom segmented control(got it from internet - its really a radio group) and under it a listview. When a user clicks on a row in the list view, a fragment is attached to the activity that displays a different listview. This new listview seems to replace the old one. The problem is that the segmented control is still there, whereas I would lik开发者_开发百科e the whole view to be the new list view. Knowing that fragments are embedded in the view group, I thought progammatically removing the segmented control would work, but it didn't, the control just becomes empty space.

It's important that the app works the way I described. I could explain in detail why this is so, if needed.

Any tips? Much appreciated.

0

精彩评论

暂无评论...
验证码 换一张
取 消