Replace snippet does not work when onclick list is displayed

I have a veiwpager that uses snippets for its pages and on one of the tabs. I have a installation with two languages, where one fragment is a fragment of a list and the other is a fragment of details. Everything works fine, updating a fragment of details when a list item is clicked.

But I’m trying now to replace the list fragment with another in the list element, but I can’t make it work no matter what I try, none of the fragments are encoded, and the list fragment itself is added through childfragmentManager to satisfy the nested requirements for the fragment, but, it doesn't seem to matter that I'm trying to replace a piece of the list with another, I always get an error message or when I try to manually delete and then add, it will work, but it will not be added.

the error message doesn't seem to me useful, at least for me, but here is an example

06-03 01:49:04.707: E/AndroidRuntime(1431): FATAL EXCEPTION: main 06-03 01:49:04.707: E/AndroidRuntime(1431): java.lang.NullPointerException 06-03 01:49:04.707: E/AndroidRuntime(1431): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:651) 06-03 01:49:04.707: E/AndroidRuntime(1431): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444) 06-03 01:49:04.707: E/AndroidRuntime(1431): at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:429) 06-03 01:49:04.707: E/AndroidRuntime(1431): at android.os.Handler.handleCallback(Handler.java:725) 06-03 01:49:04.707: E/AndroidRuntime(1431): at android.os.Handler.dispatchMessage(Handler.java:92) 06-03 01:49:04.707: E/AndroidRuntime(1431): at android.os.Looper.loop(Looper.java:137) 06-03 01:49:04.707: E/AndroidRuntime(1431): at android.app.ActivityThread.main(ActivityThread.java:5041) 06-03 01:49:04.707: E/AndroidRuntime(1431): at java.lang.reflect.Method.invokeNative(Native Method) 06-03 01:49:04.707: E/AndroidRuntime(1431): at java.lang.reflect.Method.invoke(Method.java:511) 06-03 01:49:04.707: E/AndroidRuntime(1431): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 06-03 01:49:04.707: E/AndroidRuntime(1431): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 06-03 01:49:04.707: E/AndroidRuntime(1431): at dalvik.system.NativeStart.main(Native Method) 

if anyone has any ideas for a solution that will be great!

+4
source share
1 answer

I found my problem myself, I made a link to a freeze frame for another purpose in a fragment that I replaced with my original list, I completely forgot about this link using this fragment, since the replacement should have been a temporary mistake for a beginner.

0
source

Source: https://habr.com/ru/post/1484115/


All Articles