Reputation: 861
I have a sliding pane layout with a listview on the left, and a pane with my fragments on the right. When I click the listview items, my fragment correctly loads in the right side pane. The user then needs to slide the pane to bring it to the forefront. I would like the pane to automatically slide to the forefront when the user clicks the listview item, instead of having to manually slide it.
This is where I load my fragment into the side frame. Again, this is working 'correctly', but not with the functionality I am looking for.
fragmentManager.beginTransaction()
.replace(R.id.frame_to_be_replaced, fragment)
.commit();
Upvotes: 3
Views: 450
Reputation: 6215
I think you may be hiding the fragment because the replace
and commit
methods should immediately show the fragment. Try this for now, FragmentTransaction.show()
method.
Upvotes: 1