Home
last modified time | relevance | path

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

12345

/frameworks/support/v4/java/android/support/v4/app/
DFragmentPagerAdapter.java92 Fragment fragment = mFragmentManager.findFragmentByTag(name); in instantiateItem() local
93 if (fragment != null) { in instantiateItem()
94 if (DEBUG) Log.v(TAG, "Attaching item #" + itemId + ": f=" + fragment); in instantiateItem()
95 mCurTransaction.attach(fragment); in instantiateItem()
97 fragment = getItem(position); in instantiateItem()
98 if (DEBUG) Log.v(TAG, "Adding item #" + itemId + ": f=" + fragment); in instantiateItem()
99 mCurTransaction.add(container.getId(), fragment, in instantiateItem() local
102 if (fragment != mCurrentPrimaryItem) { in instantiateItem()
103 fragment.setMenuVisibility(false); in instantiateItem()
104 fragment.setUserVisibleHint(false); in instantiateItem()
[all …]
DBackStackRecord.java68 mOps[pos++] = op.fragment != null ? op.fragment.mIndex : -1; in BackStackState()
122 op.fragment = f; in instantiate()
124 op.fragment = null; in instantiate()
210 Fragment fragment; field in BackStackRecord.Op
319 writer.print(" "); writer.println(op.fragment); in dump()
400 public FragmentTransaction add(Fragment fragment, String tag) { in add() argument
401 doAddOp(0, fragment, tag, OP_ADD); in add()
405 public FragmentTransaction add(int containerViewId, Fragment fragment) { in add() argument
406 doAddOp(containerViewId, fragment, null, OP_ADD); in add()
410 public FragmentTransaction add(int containerViewId, Fragment fragment, String tag) { in add() argument
[all …]
DFragmentStatePagerAdapter.java105 Fragment fragment = getItem(position); in instantiateItem() local
106 if (DEBUG) Log.v(TAG, "Adding item #" + position + ": f=" + fragment); in instantiateItem()
110 fragment.setInitialSavedState(fss); in instantiateItem()
116 fragment.setMenuVisibility(false); in instantiateItem()
117 fragment.setUserVisibleHint(false); in instantiateItem()
118 mFragments.set(position, fragment); in instantiateItem()
119 mCurTransaction.add(container.getId(), fragment); in instantiateItem() local
121 return fragment; in instantiateItem()
126 Fragment fragment = (Fragment)object; in destroyItem() local
136 mSavedState.set(position, mFragmentManager.saveFragmentInstanceState(fragment)); in destroyItem()
[all …]
DFragmentManager.java291 public abstract void putFragment(Bundle bundle, String key, Fragment fragment); in putFragment() argument
569 public void putFragment(Bundle bundle, String key, Fragment fragment) { in putFragment() argument
570 if (fragment.mIndex < 0) { in putFragment()
571 throwException(new IllegalStateException("Fragment " + fragment in putFragment()
574 bundle.putInt(key, fragment.mIndex); in putFragment()
601 public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) { in saveFragmentInstanceState() argument
602 if (fragment.mIndex < 0) { in saveFragmentInstanceState()
603 throwException( new IllegalStateException("Fragment " + fragment in saveFragmentInstanceState()
606 if (fragment.mState > Fragment.INITIALIZING) { in saveFragmentInstanceState()
607 Bundle result = saveFragmentBasicState(fragment); in saveFragmentInstanceState()
[all …]
DFragmentTransaction.java42 public abstract FragmentTransaction add(Fragment fragment, String tag); in add() argument
47 public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment); in add() argument
64 public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment, in add() argument
70 public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment); in replace() argument
88 public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment, in replace() argument
99 public abstract FragmentTransaction remove(Fragment fragment); in remove() argument
110 public abstract FragmentTransaction hide(Fragment fragment); in hide() argument
121 public abstract FragmentTransaction show(Fragment fragment); in show() argument
134 public abstract FragmentTransaction detach(Fragment fragment); in detach() argument
146 public abstract FragmentTransaction attach(Fragment fragment); in attach() argument
DFragmentTabHost.java65 private Fragment fragment; field in FragmentTabHost.TabInfo
236 info.fragment = mFragmentManager.findFragmentByTag(tag); in addTab()
237 if (info.fragment != null && !info.fragment.isDetached()) { in addTab()
239 ft.detach(info.fragment); in addTab()
259 tab.fragment = mFragmentManager.findFragmentByTag(tab.tag); in onAttachedToWindow()
260 if (tab.fragment != null && !tab.fragment.isDetached()) { in onAttachedToWindow()
272 ft.detach(tab.fragment); in onAttachedToWindow()
337 if (mLastTab.fragment != null) { in doTabChanged()
338 ft.detach(mLastTab.fragment); in doTabChanged()
342 if (newTab.fragment == null) { in doTabChanged()
[all …]
/frameworks/opt/photoviewer/src/com/android/ex/photo/adapters/
DBaseFragmentPagerAdapter.java82 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()
92 if (DEBUG) Log.v(TAG, "Adding item #" + position + ": f=" + fragment); in instantiateItem()
93 mCurTransaction.add(container.getId(), fragment, in instantiateItem() local
96 if (fragment != mCurrentPrimaryItem) { in instantiateItem()
97 fragment.setMenuVisibility(false); in instantiateItem()
[all …]
/frameworks/support/v13/java/android/support/v13/app/
DFragmentPagerAdapter.java96 Fragment fragment = mFragmentManager.findFragmentByTag(name); in instantiateItem() local
97 if (fragment != null) { in instantiateItem()
98 if (DEBUG) Log.v(TAG, "Attaching item #" + itemId + ": f=" + fragment); in instantiateItem()
99 mCurTransaction.attach(fragment); in instantiateItem()
101 fragment = getItem(position); in instantiateItem()
102 if (DEBUG) Log.v(TAG, "Adding item #" + itemId + ": f=" + fragment); in instantiateItem()
103 mCurTransaction.add(container.getId(), fragment, in instantiateItem() local
106 if (fragment != mCurrentPrimaryItem) { in instantiateItem()
107 FragmentCompat.setMenuVisibility(fragment, false); in instantiateItem()
108 FragmentCompat.setUserVisibleHint(fragment, false); in instantiateItem()
[all …]
DFragmentStatePagerAdapter.java109 Fragment fragment = getItem(position); in instantiateItem() local
110 if (DEBUG) Log.v(TAG, "Adding item #" + position + ": f=" + fragment); in instantiateItem()
114 fragment.setInitialSavedState(fss); in instantiateItem()
120 FragmentCompat.setMenuVisibility(fragment, false); in instantiateItem()
121 FragmentCompat.setUserVisibleHint(fragment, false); in instantiateItem()
122 mFragments.set(position, fragment); in instantiateItem()
123 mCurTransaction.add(container.getId(), fragment); in instantiateItem() local
125 return fragment; in instantiateItem()
130 Fragment fragment = (Fragment)object; in destroyItem() local
140 mSavedState.set(position, mFragmentManager.saveFragmentInstanceState(fragment)); in destroyItem()
[all …]
DFragmentTabHost.java57 private Fragment fragment; field in FragmentTabHost.TabInfo
228 info.fragment = mFragmentManager.findFragmentByTag(tag); in addTab()
229 if (info.fragment != null && !info.fragment.isDetached()) { in addTab()
231 ft.detach(info.fragment); in addTab()
251 tab.fragment = mFragmentManager.findFragmentByTag(tab.tag); in onAttachedToWindow()
252 if (tab.fragment != null && !tab.fragment.isDetached()) { in onAttachedToWindow()
264 ft.detach(tab.fragment); in onAttachedToWindow()
329 if (mLastTab.fragment != null) { in doTabChanged()
330 ft.detach(mLastTab.fragment); in doTabChanged()
334 if (newTab.fragment == null) { in doTabChanged()
[all …]
/frameworks/base/core/java/android/app/
DFragmentTransaction.java19 public abstract FragmentTransaction add(Fragment fragment, String tag); in add() argument
24 public abstract FragmentTransaction add(int containerViewId, Fragment fragment); in add() argument
41 public abstract FragmentTransaction add(int containerViewId, Fragment fragment, String tag); in add() argument
46 public abstract FragmentTransaction replace(int containerViewId, Fragment fragment); in replace() argument
64 public abstract FragmentTransaction replace(int containerViewId, Fragment fragment, String tag); in replace() argument
74 public abstract FragmentTransaction remove(Fragment fragment); in remove() argument
85 public abstract FragmentTransaction hide(Fragment fragment); in hide() argument
96 public abstract FragmentTransaction show(Fragment fragment); in show() argument
109 public abstract FragmentTransaction detach(Fragment fragment); in detach() argument
121 public abstract FragmentTransaction attach(Fragment fragment); in attach() argument
DFragmentManager.java288 public abstract void putFragment(Bundle bundle, String key, Fragment fragment); in putFragment() argument
566 public void putFragment(Bundle bundle, String key, Fragment fragment) { in putFragment() argument
567 if (fragment.mIndex < 0) { in putFragment()
568 throwException(new IllegalStateException("Fragment " + fragment in putFragment()
571 bundle.putInt(key, fragment.mIndex); in putFragment()
593 public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) { in saveFragmentInstanceState() argument
594 if (fragment.mIndex < 0) { in saveFragmentInstanceState()
595 throwException(new IllegalStateException("Fragment " + fragment in saveFragmentInstanceState()
598 if (fragment.mState > Fragment.INITIALIZING) { in saveFragmentInstanceState()
599 Bundle result = saveFragmentBasicState(fragment); in saveFragmentInstanceState()
[all …]
DBackStackRecord.java74 mOps[pos++] = op.fragment != null ? op.fragment.mIndex : -1; in BackStackState()
130 op.fragment = f; in instantiate()
132 op.fragment = null; in instantiate()
220 Fragment fragment; field in BackStackRecord.Op
361 writer.println(op.fragment); in dump()
446 public FragmentTransaction add(Fragment fragment, String tag) { in add() argument
447 doAddOp(0, fragment, tag, OP_ADD); in add()
451 public FragmentTransaction add(int containerViewId, Fragment fragment) { in add() argument
452 doAddOp(containerViewId, fragment, null, OP_ADD); in add()
456 public FragmentTransaction add(int containerViewId, Fragment fragment, String tag) { in add() argument
[all …]
/frameworks/base/docs/html/guide/components/
Dfragments.jd14 <li><a href="#Adding">Adding a fragment to an activity</a></li>
51 multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a
56 <p>A fragment must always be embedded in an activity and the fragment's lifecycle is directly
61 manipulate each fragment independently, such as add or remove them. When you perform such a
62 fragment transaction, you can also add it to a back stack that's managed by the
63 activity&mdash;each back stack entry in the activity is a record of the fragment transaction that
64 occurred. The back stack allows the user to reverse a fragment transaction (navigate backwards),
67 <p>When you add a fragment as a part of your activity layout, it lives in a {@link
68 android.view.ViewGroup} inside the activity's view hierarchy and the fragment defines its own view
70 You can insert a fragment into your activity layout by declaring the fragment in the activity's
[all …]
/frameworks/base/docs/html/training/basics/fragments/
Dfragment-ui.jd38 <p>For example, on a handset device it might be appropriate to display just one fragment at a time
45 fit side by side, but on a handset device, only one fragment fits at a time so the fragments must
56 <a href="creating.html">previous lesson</a> with the {@code &lt;fragment>} element&mdash;you can add
57 a fragment to the activity during the activity runtime. This is necessary
61 remove a fragment, you must use the {@link android.support.v4.app.FragmentManager} to create a
63 and perform other fragment transactions.</p>
66 initial fragment(s) to the activity during the activity's
71 in which you can insert the fragment.</p>
74 href="creating.html">previous lesson</a> that shows only one fragment at a time. In order to replace
75 one fragment with another, the activity's layout
[all …]
Dcommunicating.jd78 <p>Now the fragment can deliver messages to the activity by calling the {@code
82 <p>For example, the following method in the fragment is called when the user clicks on a list
83 item. The fragment uses the callback interface to deliver the event to the parent activity.</p>
97 <p>In order to receive event callbacks from the fragment, the activity that hosts it must
98 implement the interface defined in the fragment class.</p>
118 <p>The host activity can deliver messages to a fragment by capturing the {@link
121 directly call the fragment's public methods.</p>
123 <p>For instance, imagine that the activity shown above may contain another fragment that's used to
125 the activity can pass the information received in the callback method to the other fragment that
148 // Create fragment and give it an argument for the selected article
[all …]
Dcreating.jd32 <p>You can think of a fragment as a modular section of an activity, which has its own lifecycle,
58 <p>To create a fragment, extend the {@link android.support.v4.app.Fragment} class, then override
64 In fact, this is the only callback you need in order to get a fragment running. For
65 example, here's a simple fragment that specifies its own layout:</p>
77 // Inflate the layout for this fragment
83 <p>Just like an activity, a fragment should implement other lifecycle callbacks that allow you to
89 <p>More information about the fragment lifecycle and callback methods is available in the <a
99 fragment within your activity layout XML file.</p>
117 &lt;fragment android:name="com.example.android.fragments.HeadlinesFragment"
123 &lt;fragment android:name="com.example.android.fragments.ArticleFragment"
[all …]
Dindex.jd48 <p>When a fragment specifies its own layout, it can be configured in different combinations with
50 sizes (a small screen might show one fragment at a time, but a large screen can show two or
61 <dd>Learn how to build a fragment and implement basic behaviors within its callback
63 <dt><b><a href="fragment-ui.html">Building a Flexible UI</a></b></dt>
64 <dd>Learn how to build your app with layouts that provide different fragment configurations for
67 <dd>Learn how to set up communication paths from a fragment to the activity and other
/frameworks/opt/photoviewer/src/com/android/ex/photo/
DPhotoViewCallbacks.java82 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/core/java/android/net/
DUri.java670 private Part fragment; field in Uri.StringUri
673 return fragment == null in getFragmentPart()
674 ? fragment = Part.fromEncoded(parseFragment()) : fragment; in getFragmentPart()
785 .fragment(getFragmentPart()); in buildUpon()
790 .fragment(getFragmentPart()); in buildUpon()
812 String fragment) { in fromParts() argument
821 Part.fromDecoded(fragment)); in fromParts()
834 private final Part fragment; field in Uri.OpaqueUri
836 private OpaqueUri(String scheme, Part ssp, Part fragment) { in OpaqueUri() argument
839 this.fragment = fragment == null ? Part.NULL : fragment; in OpaqueUri()
[all …]
/frameworks/base/core/tests/coretests/src/android/net/
DUriTest.java52 .fragment("foo") in testParcelling()
145 .fragment("tee") in testEqualsAndHashCode()
195 Uri b = a.buildUpon().fragment("new").build(); in testBuildUponOpaqueUri()
206 .fragment("tee") in testBuildUponEncodedOpaqueUri()
208 Uri b = a.buildUpon().fragment("new").build(); in testBuildUponEncodedOpaqueUri()
397 Uri withFragment = uri.buildUpon().fragment("top").build(); in testOpaqueUri()
414 String path, String query, String fragment) { in testHierarchical() argument
432 if (fragment != null) { in testHierarchical()
433 sb.append('#').append(fragment); in testHierarchical()
442 uriString, ssp, uri, scheme, authority, path, query, fragment); in testHierarchical()
[all …]
/frameworks/av/media/libstagefright/rtsp/
DARTSPConnection.cpp983 AString fragment; in addAuthentication() local
984 fragment.append("Authorization: Basic "); in addAuthentication()
985 fragment.append(out); in addAuthentication()
986 fragment.append("\r\n"); in addAuthentication()
988 request->insert(fragment, i + 2); in addAuthentication()
1025 AString fragment; in addAuthentication() local
1026 fragment.append("Authorization: Digest "); in addAuthentication()
1027 fragment.append("nonce=\""); in addAuthentication()
1028 fragment.append(mNonce); in addAuthentication()
1029 fragment.append("\", "); in addAuthentication()
[all …]
/frameworks/base/docs/html/training/animation/
Dcardflip.jd18 <a href="#fragment">Create the Fragment</a>
37 animation with custom fragment animations.
246 <h2 id="fragment">
250 Create fragment classes for the front and back of the card. These classes return the layouts
252 of each fragment. You can then create instances of this fragment in the parent activity
253 where you want to show the card. The following example shows nested fragment classes inside
260 * A fragment representing the front of the card.
271 * A fragment representing the back of the card.
299 good idea to show a default fragment when the activity is created, so the following example
329 <li>Sets the custom animations that you created earlier for the fragment transitions.
[all …]
/frameworks/base/core/java/android/webkit/
DMimeTypeMap.java45 int fragment = url.lastIndexOf('#'); in getFileExtensionFromUrl() local
46 if (fragment > 0) { in getFileExtensionFromUrl()
47 url = url.substring(0, fragment); in getFileExtensionFromUrl()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/
DPrintErrorFragment.java50 PrintErrorFragment fragment = new PrintErrorFragment(); in newInstance() local
51 fragment.setArguments(arguments); in newInstance()
52 return fragment; in newInstance()

12345