Issue
Good morning, I'm using the google translator: I'm using FragmentManager ADD to navigate between fragments and save the state of the previous one so that when I press back it stays the same. But when selecting an item and adding the new fragment to the container, the layout is displayed without problems and completely covers the previous one, the problem is that the controls of the previous fragment are still active and when pressing click on different sides of the new fragment it calls procedures from the previous one. can someone tell me what is going on. I hope your help, thanking you in advance.
Android.Support.V4.App.Fragment fragment = new FamiliasProductosDetalleFragment();
fragment.Arguments = Intent;
FragmentManager.BeginTransaction()
.Add(Resource.Id.content_frame, fragment)
//.Replace(Resource.Id.content_frame,fragment)
.AddToBackStack(null)
.Commit();
Solution
Add android:clickable="true"
and android:focusable="true"
on your root layout of the fragment that shows on top.
Since you are not replacing the content frame but just adding fragments on top, clicks will fall through and reach the fragments below.
Answered By - Cheesebaron
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.