Home
last modified time | relevance | path

Searched refs:fragment (Results 1 – 25 of 99) sorted by relevance

1234

/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/lifecycle/
DLifecycleTest.java47 import org.robolectric.shadows.androidx.fragment.FragmentController;
186 final TestDialogFragment fragment = new TestDialogFragment(); in runThroughDialogFragmentLifecycles_shouldObserveEverything() local
187 FragmentController.setupFragment(fragment); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
189 fragment.onCreateOptionsMenu(null, null); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
190 fragment.onPrepareOptionsMenu(null); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
191 fragment.onOptionsItemSelected(null); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
192 assertThat(fragment.mFragObserver.mOnCreateOptionsMenuObserved).isTrue(); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
193 assertThat(fragment.mFragObserver.mOnPrepareOptionsMenuObserved).isTrue(); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
194 assertThat(fragment.mFragObserver.mOnOptionsItemSelectedObserved).isTrue(); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
196 assertThat(fragment.mFragObserver.mOnAttachObserved).isTrue(); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
[all …]
/frameworks/opt/photoviewer/src/com/android/ex/photo/adapters/
DBaseFragmentPagerAdapter.java21 import androidx.fragment.app.Fragment;
22 import androidx.fragment.app.FragmentManager;
23 import androidx.fragment.app.FragmentTransaction;
57 public BaseFragmentPagerAdapter(androidx.fragment.app.FragmentManager fm) { in BaseFragmentPagerAdapter()
82 Fragment fragment = mFragmentManager.findFragmentByTag(name); in instantiateItem() local
83 if (fragment != null) { in instantiateItem()
84 if (DEBUG) Log.v(TAG, "Attaching item #" + position + ": f=" + fragment); in instantiateItem()
85 mCurTransaction.attach(fragment); in instantiateItem()
87 fragment = getItem(position); in instantiateItem()
88 if(fragment == null) { in instantiateItem()
[all …]
/frameworks/base/core/java/android/app/
DBackStackRecord.java60 mOps[pos++] = op.fragment != null ? op.fragment.mIndex : -1; in BackStackState()
108 op.fragment = f; in instantiate()
110 op.fragment = null; in instantiate()
192 Fragment fragment; field in BackStackRecord.Op
201 Op(int cmd, Fragment fragment) { in Op() argument
203 this.fragment = fragment; in Op()
348 writer.println(op.fragment); in dump()
408 public FragmentTransaction add(Fragment fragment, String tag) { in add() argument
409 doAddOp(0, fragment, tag, OP_ADD); in add()
413 public FragmentTransaction add(int containerViewId, Fragment fragment) { in add() argument
[all …]
DFragmentManager.java317 public abstract void putFragment(Bundle bundle, String key, Fragment fragment); in putFragment() argument
928 public void putFragment(Bundle bundle, String key, Fragment fragment) { in putFragment() argument
929 if (fragment.mIndex < 0) { in putFragment()
930 throwException(new IllegalStateException("Fragment " + fragment in putFragment()
933 bundle.putInt(key, fragment.mIndex); in putFragment()
961 public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) { in saveFragmentInstanceState() argument
962 if (fragment.mIndex < 0) { in saveFragmentInstanceState()
963 throwException(new IllegalStateException("Fragment " + fragment in saveFragmentInstanceState()
966 if (fragment.mState > Fragment.INITIALIZING) { in saveFragmentInstanceState()
967 Bundle result = saveFragmentBasicState(fragment); in saveFragmentInstanceState()
[all …]
DFragmentTransaction.java33 public abstract FragmentTransaction add(Fragment fragment, String tag); in add() argument
38 public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment); in add() argument
55 public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment, in add() argument
61 public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment); in replace() argument
79 public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment, in replace() argument
90 public abstract FragmentTransaction remove(Fragment fragment); in remove() argument
101 public abstract FragmentTransaction hide(Fragment fragment); in hide() argument
112 public abstract FragmentTransaction show(Fragment fragment); in show() argument
125 public abstract FragmentTransaction detach(Fragment fragment); in detach() argument
137 public abstract FragmentTransaction attach(Fragment fragment); in attach() argument
[all …]
DFragmentTransition.java1103 Fragment fragment, ArrayList<View> sharedElements, View nonExistentView) { in configureEnteringExitingViews() argument
1107 View root = fragment.getView(); in configureEnteringExitingViews()
1249 final Fragment fragment = op.fragment; in addToFirstInLastOut() local
1250 if (fragment == null) { in addToFirstInLastOut()
1253 final int containerId = fragment.mContainerId; in addToFirstInLastOut()
1265 setLastIn = fragment.mHiddenChanged && !fragment.mHidden && in addToFirstInLastOut()
1266 fragment.mAdded; in addToFirstInLastOut()
1268 setLastIn = fragment.mHidden; in addToFirstInLastOut()
1275 setLastIn = fragment.mIsNewlyAdded; in addToFirstInLastOut()
1277 setLastIn = !fragment.mAdded && !fragment.mHidden; in addToFirstInLastOut()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/
DLifecycleFragmentTest.java53 LifecycleFragment fragment = (LifecycleFragment) mFragment; in testCreateLifecycle() local
55 fragment.getLifecycle().addObserver(observer); in testCreateLifecycle()
60 verify(observer).onStateChanged(eq(fragment), eq(ON_CREATE)); in testCreateLifecycle()
65 LifecycleFragment fragment = (LifecycleFragment) mFragment; in testResumeLifecycle() local
67 fragment.getLifecycle().addObserver(observer); in testResumeLifecycle()
72 verify(observer).onStateChanged(eq(fragment), eq(ON_RESUME)); in testResumeLifecycle()
77 LifecycleFragment fragment = (LifecycleFragment) mFragment; in testStartLifecycle() local
79 fragment.getLifecycle().addObserver(observer); in testStartLifecycle()
84 verify(observer).onStateChanged(eq(fragment), eq(ON_START)); in testStartLifecycle()
89 LifecycleFragment fragment = (LifecycleFragment) mFragment; in testStopLifecycle() local
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DCollapsedStatusBarFragmentTest.java85 CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment; in testDisableNone() local
86 fragment.initNotificationIconArea(mMockNotificiationAreaController); in testDisableNone()
87 fragment.disable(DEFAULT_DISPLAY, 0, 0, false); in testDisableNone()
100 CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment; in testDisableSystemInfo() local
101 fragment.initNotificationIconArea(mMockNotificiationAreaController); in testDisableSystemInfo()
102 fragment.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_SYSTEM_INFO, 0, false); in testDisableSystemInfo()
107 fragment.disable(DEFAULT_DISPLAY, 0, 0, false); in testDisableSystemInfo()
118 CollapsedStatusBarFragment fragment = (CollapsedStatusBarFragment) mFragment; in testDisableNotifications() local
119 fragment.initNotificationIconArea(mMockNotificiationAreaController); in testDisableNotifications()
120 fragment.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_NOTIFICATION_ICONS, 0, false); in testDisableNotifications()
[all …]
/frameworks/opt/car/setupwizard/library/main/tests/robotests/src/com/android/car/setupwizardlib/
DBaseCompatActivityTest.java36 import androidx.fragment.app.Fragment;
188 Fragment fragment = new Fragment(); in testSetContentFragmentWhenFragmentCommitsAllowed() local
189 spyBaseCompatActivity.setContentFragment(fragment); in testSetContentFragmentWhenFragmentCommitsAllowed()
191 assertThat(spyBaseCompatActivity.getContentFragment()).isEqualTo(fragment); in testSetContentFragmentWhenFragmentCommitsAllowed()
195 verify(spyBaseCompatActivity).onContentFragmentSet(fragment); in testSetContentFragmentWhenFragmentCommitsAllowed()
207 Fragment fragment = new Fragment(); in testSetContentFragmentWhenFragmentCommitsNotAllowed() local
208 spyBaseCompatActivity.setContentFragment(fragment); in testSetContentFragmentWhenFragmentCommitsNotAllowed()
214 verify(spyBaseCompatActivity, times(0)).onContentFragmentSet(fragment); in testSetContentFragmentWhenFragmentCommitsNotAllowed()
226 Fragment fragment = new Fragment(); in testSetContentFragmentWithBackstackWhenFragmentCommitsAllowed() local
227 spyBaseCompatActivity.setContentFragmentWithBackstack(fragment); in testSetContentFragmentWithBackstackWhenFragmentCommitsAllowed()
[all …]
/frameworks/opt/photoviewer/src/com/android/ex/photo/
DPhotoViewCallbacks.java5 import androidx.fragment.app.Fragment;
82 public void onFragmentPhotoLoadComplete(PhotoViewFragment fragment, in onFragmentPhotoLoadComplete() argument
87 public boolean isFragmentActive(Fragment fragment); in isFragmentActive() argument
89 public void onFragmentVisible(PhotoViewFragment fragment); in onFragmentVisible() argument
91 public boolean isFragmentFullScreen(Fragment fragment); in isFragmentFullScreen() argument
93 public void onCursorChanged(PhotoViewFragment fragment, Cursor cursor); in onCursorChanged() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DTunerActivity.java60 final PreferenceFragment fragment = showDemoMode ? new DemoModeFragment() in onCreate() local
63 fragment, TAG_TUNER).commit(); in onCreate()
94 Fragment fragment = (Fragment) cls.newInstance(); in onPreferenceStartFragment() local
97 fragment.setArguments(b); in onPreferenceStartFragment()
100 transaction.replace(R.id.content_frame, fragment); in onPreferenceStartFragment()
113 SubSettingsFragment fragment = new SubSettingsFragment(); in onPreferenceStartScreen() local
116 fragment.setArguments(b); in onPreferenceStartScreen()
117 fragment.setTargetFragment(caller, 0); in onPreferenceStartScreen()
118 transaction.replace(R.id.content_frame, fragment); in onPreferenceStartScreen()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/recyclerview/
DRvCompatListActivity.java21 import androidx.fragment.app.Fragment;
22 import androidx.fragment.app.FragmentManager;
55 RecyclerViewFragment fragment = new RecyclerViewFragment(); in onCreate() local
56 fragment.layoutManager = createLayoutManager(this); in onCreate()
57 fragment.adapter = createAdapter(); in onCreate()
58 fm.beginTransaction().add(android.R.id.content, fragment).commit(); in onCreate()
/frameworks/base/core/java/android/util/proto/
DProtoInputStream.java601 final int fragment = mEnd - mOffset; in readVarint() local
602 for (int i = 0; i < fragment; i++) { in readVarint()
618 incOffset(fragment); in readVarint()
646 int fragment = (mEnd - mOffset) < bytesLeft ? (mEnd - mOffset) : bytesLeft; in readFixed32() local
647 incOffset(fragment); in readFixed32()
648 bytesLeft -= fragment; in readFixed32()
649 while (fragment > 0) { in readFixed32()
650 value |= ((mBuffer[mOffset - fragment] & 0xFF) << shift); in readFixed32()
651 fragment--; in readFixed32()
686 int fragment = (mEnd - mOffset) < bytesLeft ? (mEnd - mOffset) : bytesLeft; in readFixed64() local
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/inputmethod/
DInputMethodAndSubtypeEnablerManager.java53 public InputMethodAndSubtypeEnablerManager(PreferenceFragment fragment) { in InputMethodAndSubtypeEnablerManager() argument
54 mFragment = fragment; in InputMethodAndSubtypeEnablerManager()
55 mImm = fragment.getContext().getSystemService(InputMethodManager.class); in InputMethodAndSubtypeEnablerManager()
60 public void init(PreferenceFragment fragment, String targetImi, PreferenceScreen root) { in init() argument
61 final Configuration config = fragment.getResources().getConfiguration(); in init()
67 addInputMethodSubtypePreferences(fragment, imi, root); in init()
72 public void refresh(Context context, PreferenceFragment fragment) { in refresh() argument
77 InputMethodAndSubtypeUtil.loadInputMethodSubtypeList(fragment, context.getContentResolver(), in refresh()
82 public void save(Context context, PreferenceFragment fragment) { in save() argument
83 InputMethodAndSubtypeUtil.saveInputMethodSubtypeList(fragment, context.getContentResolver(), in save()
[all …]
DInputMethodAndSubtypeEnablerManagerCompat.java54 public InputMethodAndSubtypeEnablerManagerCompat(PreferenceFragmentCompat fragment) { in InputMethodAndSubtypeEnablerManagerCompat() argument
55 mFragment = fragment; in InputMethodAndSubtypeEnablerManagerCompat()
56 mImm = fragment.getContext().getSystemService(InputMethodManager.class); in InputMethodAndSubtypeEnablerManagerCompat()
61 public void init(PreferenceFragmentCompat fragment, String targetImi, PreferenceScreen root) { in init() argument
62 final Configuration config = fragment.getResources().getConfiguration(); in init()
68 addInputMethodSubtypePreferences(fragment, imi, root); in init()
73 public void refresh(Context context, PreferenceFragmentCompat fragment) { in refresh() argument
78 InputMethodAndSubtypeUtilCompat.loadInputMethodSubtypeList(fragment, in refresh()
83 public void save(Context context, PreferenceFragmentCompat fragment) { in save() argument
84 InputMethodAndSubtypeUtilCompat.saveInputMethodSubtypeList(fragment, in save()
[all …]
/frameworks/base/core/java/android/net/
DUri.java696 private Part fragment; field in Uri.StringUri
699 return fragment == null in getFragmentPart()
700 ? fragment = Part.fromEncoded(parseFragment()) : fragment; in getFragmentPart()
819 .fragment(getFragmentPart()); in buildUpon()
824 .fragment(getFragmentPart()); in buildUpon()
846 String fragment) { in fromParts() argument
855 Part.fromDecoded(fragment)); in fromParts()
868 private final Part fragment; field in Uri.OpaqueUri
870 private OpaqueUri(String scheme, Part ssp, Part fragment) { in OpaqueUri() argument
873 this.fragment = fragment == null ? Part.NULL : fragment; in OpaqueUri()
[all …]
/frameworks/av/media/libstagefright/rtsp/
DARTSPConnection.cpp987 AString fragment; in addAuthentication() local
988 fragment.append("Authorization: Basic "); in addAuthentication()
989 fragment.append(out); in addAuthentication()
990 fragment.append("\r\n"); in addAuthentication()
992 request->insert(fragment, i + 2); in addAuthentication()
1028 AString fragment; in addAuthentication() local
1029 fragment.append("Authorization: Digest "); in addAuthentication()
1030 fragment.append("nonce=\""); in addAuthentication()
1031 fragment.append(mNonce); in addAuthentication()
1032 fragment.append("\", "); in addAuthentication()
[all …]
/frameworks/base/core/tests/coretests/src/android/net/
DUriTest.java56 .fragment("foo") in testParcelling()
149 .fragment("tee") in testEqualsAndHashCode()
209 Uri b = a.buildUpon().fragment("new").build(); in testBuildUponOpaqueUri()
220 .fragment("tee") in testBuildUponEncodedOpaqueUri()
222 Uri b = a.buildUpon().fragment("new").build(); in testBuildUponEncodedOpaqueUri()
411 Uri withFragment = uri.buildUpon().fragment("top").build(); in testOpaqueUri()
428 String path, String query, String fragment) { in testHierarchical() argument
446 if (fragment != null) { in testHierarchical()
447 sb.append('#').append(fragment); in testHierarchical()
456 uriString, ssp, uri, scheme, authority, path, query, fragment); in testHierarchical()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DCustomDialogPreferenceCompat.java76 private void setFragment(CustomPreferenceDialogFragment fragment) { in setFragment() argument
77 mFragment = fragment; in setFragment()
87 final CustomPreferenceDialogFragment fragment = new CustomPreferenceDialogFragment(); in newInstance() local
90 fragment.setArguments(b); in newInstance()
91 return fragment; in newInstance()
DCustomDialogPreference.java82 private void setFragment(CustomPreferenceDialogFragment fragment) { in setFragment() argument
83 mFragment = fragment; in setFragment()
93 final CustomPreferenceDialogFragment fragment = new CustomPreferenceDialogFragment(); in newInstance() local
96 fragment.setArguments(b); in newInstance()
97 return fragment; in newInstance()
DCustomEditTextPreference.java98 private void setFragment(CustomPreferenceDialogFragment fragment) { in setFragment() argument
99 mFragment = fragment; in setFragment()
105 final CustomPreferenceDialogFragment fragment = new CustomPreferenceDialogFragment(); in newInstance() local
108 fragment.setArguments(b); in newInstance()
109 return fragment; in newInstance()
DCustomEditTextPreferenceCompat.java92 private void setFragment(CustomPreferenceDialogFragment fragment) { in setFragment() argument
93 mFragment = fragment; in setFragment()
100 final CustomPreferenceDialogFragment fragment = new CustomPreferenceDialogFragment(); in newInstance() local
103 fragment.setArguments(b); in newInstance()
104 return fragment; in newInstance()
/frameworks/opt/car/setupwizard/library/main/src/com/android/car/setupwizardlib/
DBaseActivity.java28 import androidx.fragment.app.Fragment;
29 import androidx.fragment.app.FragmentActivity;
162 protected void setContentFragmentWithBackstack(Fragment fragment) { in setContentFragmentWithBackstack() argument
165 .replace(R.id.car_setup_wizard_layout, fragment, CONTENT_FRAGMENT_TAG) in setContentFragmentWithBackstack()
185 protected void setContentFragment(Fragment fragment) { in setContentFragment() argument
193 .replace(R.id.car_setup_wizard_layout, fragment, CONTENT_FRAGMENT_TAG) in setContentFragment()
220 protected void onContentFragmentSet(Fragment fragment) { in onContentFragmentSet() argument
DBaseSetupWizardActivity.java28 import androidx.fragment.app.Fragment;
29 import androidx.fragment.app.FragmentActivity;
169 protected void setContentFragmentWithBackstack(Fragment fragment) { in setContentFragmentWithBackstack() argument
172 .replace(R.id.car_setup_wizard_layout, fragment, CONTENT_FRAGMENT_TAG) in setContentFragmentWithBackstack()
192 protected void setContentFragment(Fragment fragment) { in setContentFragment() argument
200 .replace(R.id.car_setup_wizard_layout, fragment, CONTENT_FRAGMENT_TAG) in setContentFragment()
227 protected void onContentFragmentSet(Fragment fragment) { in onContentFragmentSet() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/fragments/
DFragmentHostManager.java135 private void onFragmentViewCreated(Fragment fragment) { in onFragmentViewCreated() argument
136 String tag = fragment.getTag(); in onFragmentViewCreated()
140 listeners.forEach((listener) -> listener.onFragmentViewCreated(tag, fragment)); in onFragmentViewCreated()
144 private void onFragmentViewDestroyed(Fragment fragment) { in onFragmentViewDestroyed() argument
145 String tag = fragment.getTag(); in onFragmentViewDestroyed()
149 listeners.forEach((listener) -> listener.onFragmentViewDestroyed(tag, fragment)); in onFragmentViewDestroyed()
196 void onFragmentViewCreated(String tag, Fragment fragment); in onFragmentViewCreated() argument
200 default void onFragmentViewDestroyed(String tag, Fragment fragment) { in onFragmentViewDestroyed() argument
245 public boolean onShouldSaveFragmentState(Fragment fragment) { in onShouldSaveFragmentState() argument
270 public void onAttachFragment(Fragment fragment) { in onAttachFragment() argument

1234