pollux-
11/03/2020, 6:21 PMFragment(int layout)
I'm getting couldn't find fragment constructor, I'm suspecting this guy.. 😭
But I also see it's call super().
I have HomeFragment which extends the BaseFragment.
Is that because of that .Ian Lake
11/03/2020, 6:23 PMFragment can use the Fragment(int layout) constructor in its zero argument constructor to set the default layout.Ian Lake
11/03/2020, 6:25 PMBaseFragment(@LayoutRes layout: Int = 0) and HomeFragment : BaseFragment(R.layout.fragment_home)Ryan
11/03/2020, 6:26 PMRyan
11/03/2020, 6:26 PMIan Lake
11/03/2020, 6:26 PMpollux-
11/03/2020, 6:28 PMpollux-
11/03/2020, 6:29 PMpollux-
11/03/2020, 6:30 PMpollux-
11/03/2020, 6:31 PMIan Lake
11/03/2020, 6:33 PMIan Lake
11/03/2020, 6:33 PMBaseFragment to the FragmentManager (but only subtypes), it doesn't matter if BaseFragment has a zero argument constructorpollux-
11/03/2020, 9:54 PMadb shell am send-trim-memory or logcat terminate application? @Ian Lakepollux-
11/03/2020, 9:55 PMIan Lake
11/03/2020, 9:56 PMpollux-
11/03/2020, 9:58 PMpollux-
11/03/2020, 10:04 PMpollux-
11/03/2020, 10:04 PMIan Lake
11/03/2020, 10:08 PMHomeFragment has a zero arg constructor like the image you shared has, no, that won't crash, no matter what your BaseFragment does or what constructor it has or callspollux-
11/03/2020, 10:14 PMpollux-
11/03/2020, 10:16 PMCouldn't find fragment constructor this is the exception I'm getting if I go with what is there in screenshotpollux-
11/03/2020, 10:17 PMIan Lake
11/03/2020, 10:19 PMHomeFragment()pollux-
11/03/2020, 10:29 PMpollux-
11/03/2020, 10:29 PMpollux-
11/03/2020, 10:29 PMpollux-
11/03/2020, 10:30 PMIan Lake
11/03/2020, 10:47 PMpollux-
11/04/2020, 12:28 AMIan Lake
11/04/2020, 12:29 AMpollux-
11/04/2020, 2:08 AMIan Lake
11/04/2020, 3:38 AMpollux-
11/04/2020, 4:32 AM