Lines Matching refs:fragment

17 package androidx.fragment.app;
34 import androidx.fragment.app.test.FragmentTestActivity;
35 import androidx.fragment.test.R;
62 final StrictViewFragment fragment = new StrictViewFragment();
63 fragment.setLayoutId(R.layout.fragment_a);
64 fm.beginTransaction().add(R.id.content, fragment).commitNow();
66 fragment.getViewLifecycleOwner().getLifecycle().getCurrentState());
75 final Fragment fragment = new Fragment();
76 fm.beginTransaction().add(fragment, "fragment").commitNow();
78 fragment.getViewLifecycleOwner();
91 final Fragment fragment = new ObserveInOnCreateViewFragment();
93 fm.beginTransaction().add(fragment, "fragment").commitNow();
99 fm.beginTransaction().remove(fragment).commitNow();
109 final StrictViewFragment fragment = new StrictViewFragment();
110 fragment.setLayoutId(R.layout.fragment_a);
111 fm.beginTransaction().add(R.id.content, fragment).runOnCommit(new Runnable() {
115 fragment.getViewLifecycleOwner().getLifecycle().getCurrentState());
129 final StrictViewFragment fragment = new StrictViewFragment();
130 fragment.setLayoutId(R.layout.fragment_a);
134 fragment.getViewLifecycleOwnerLiveData().observe(activity,
141 fragment.mOnCreateViewCalled);
146 fragment.mOnDestroyViewCalled);
151 fm.beginTransaction().add(R.id.content, fragment).commitNow();
153 fm.beginTransaction().remove(fragment).commitNow();
165 final ObservingFragment fragment = new ObservingFragment();
166 fragment.setLayoutId(R.layout.fragment_a);
167 fm.beginTransaction().add(R.id.content, fragment).commitNow();
168 LifecycleOwner viewLifecycleOwner = fragment.getViewLifecycleOwner();
172 fragment.mLiveData.hasActiveObservers());
174 fm.beginTransaction().detach(fragment).commitNow();
178 fragment.mLiveData.hasActiveObservers());
180 fragment.getViewLifecycleOwner();
193 final ObservingFragment fragment = new ObservingFragment();
194 fragment.setLayoutId(R.layout.fragment_a);
195 fm.beginTransaction().add(R.id.content, fragment).commitNow();
196 LifecycleOwner viewLifecycleOwner = fragment.getViewLifecycleOwner();
200 fragment.mLiveData.hasActiveObservers());
202 fm.beginTransaction().detach(fragment).commitNow();
207 fragment.mLiveData.hasActiveObservers());
209 fm.beginTransaction().attach(fragment).commitNow();
211 viewLifecycleOwner, fragment.getViewLifecycleOwner());
213 fragment.getViewLifecycleOwner().getLifecycle().getCurrentState());
215 fragment.mLiveData.hasActiveObservers());