Home
last modified time | relevance | path

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

1234

/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/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.java57 mOps[pos++] = op.fragment != null ? op.fragment.mIndex : -1; in BackStackState()
107 op.fragment = f; in instantiate()
109 op.fragment = null; in instantiate()
191 Fragment fragment; field in BackStackRecord.Op
297 writer.print(" "); writer.println(op.fragment); in dump()
378 public FragmentTransaction add(Fragment fragment, String tag) { in add() argument
379 doAddOp(0, fragment, tag, OP_ADD); in add()
383 public FragmentTransaction add(int containerViewId, Fragment fragment) { in add() argument
384 doAddOp(containerViewId, fragment, null, OP_ADD); in add()
388 public FragmentTransaction add(int containerViewId, Fragment fragment, String tag) { in add() argument
[all …]
DFragmentTransaction.java30 public abstract FragmentTransaction add(Fragment fragment, String tag); in add() argument
35 public abstract FragmentTransaction add(int containerViewId, Fragment fragment); in add() argument
52 public abstract FragmentTransaction add(int containerViewId, Fragment fragment, String tag); in add() argument
57 public abstract FragmentTransaction replace(int containerViewId, Fragment fragment); in replace() argument
75 public abstract FragmentTransaction replace(int containerViewId, Fragment fragment, String tag); in replace() argument
85 public abstract FragmentTransaction remove(Fragment fragment); in remove() argument
96 public abstract FragmentTransaction hide(Fragment fragment); in hide() argument
107 public abstract FragmentTransaction show(Fragment fragment); in show() argument
120 public abstract FragmentTransaction detach(Fragment fragment); in detach() argument
132 public abstract FragmentTransaction attach(Fragment fragment); in attach() argument
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.java281 public abstract void putFragment(Bundle bundle, String key, Fragment fragment); in putFragment() argument
544 public void putFragment(Bundle bundle, String key, Fragment fragment) { in putFragment() argument
545 if (fragment.mIndex < 0) { in putFragment()
546 throwException(new IllegalStateException("Fragment " + fragment in putFragment()
549 bundle.putInt(key, fragment.mIndex); in putFragment()
571 public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) { in saveFragmentInstanceState() argument
572 if (fragment.mIndex < 0) { in saveFragmentInstanceState()
573 throwException( new IllegalStateException("Fragment " + fragment in saveFragmentInstanceState()
576 if (fragment.mState > Fragment.INITIALIZING) { in saveFragmentInstanceState()
577 Bundle result = saveFragmentBasicState(fragment); in saveFragmentInstanceState()
[all …]
DFragmentActivity.java260 Fragment fragment = id != View.NO_ID ? mFragments.findFragmentById(id) : null; in onCreateView() local
261 if (fragment == null && tag != null) { in onCreateView()
262 fragment = mFragments.findFragmentByTag(tag); in onCreateView()
264 if (fragment == null && containerId != View.NO_ID) { in onCreateView()
265 fragment = mFragments.findFragmentById(containerId); in onCreateView()
270 + " existing=" + fragment); in onCreateView()
271 if (fragment == null) { in onCreateView()
272 fragment = Fragment.instantiate(this, fname); in onCreateView()
273 fragment.mFromLayout = true; in onCreateView()
274 fragment.mFragmentId = id != 0 ? id : containerId; in onCreateView()
[all …]
DFragmentTabHost.java65 private Fragment fragment; field in FragmentTabHost.TabInfo
232 info.fragment = mFragmentManager.findFragmentByTag(tag); in addTab()
233 if (info.fragment != null && !info.fragment.isDetached()) { in addTab()
235 ft.detach(info.fragment); in addTab()
255 tab.fragment = mFragmentManager.findFragmentByTag(tab.tag); in onAttachedToWindow()
256 if (tab.fragment != null && !tab.fragment.isDetached()) { in onAttachedToWindow()
268 ft.detach(tab.fragment); in onAttachedToWindow()
333 if (mLastTab.fragment != null) { in doTabChanged()
334 ft.detach(mLastTab.fragment); in doTabChanged()
338 if (newTab.fragment == null) { in doTabChanged()
[all …]
/frameworks/ex/photoviewer/src/com/android/ex/photo/adapters/
DBaseFragmentPagerAdapter.java83 Fragment fragment = mFragmentManager.findFragmentByTag(name); in instantiateItem() local
84 if (fragment != null) { in instantiateItem()
85 if (DEBUG) Log.v(TAG, "Attaching item #" + position + ": f=" + fragment); in instantiateItem()
86 mCurTransaction.attach(fragment); in instantiateItem()
88 fragment = getItem(position); in instantiateItem()
89 if (DEBUG) Log.v(TAG, "Adding item #" + position + ": f=" + fragment); in instantiateItem()
90 mCurTransaction.add(container.getId(), fragment, in instantiateItem() local
93 if (fragment != mCurrentPrimaryItem) { in instantiateItem()
94 fragment.setMenuVisibility(false); in instantiateItem()
97 return fragment; 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
224 info.fragment = mFragmentManager.findFragmentByTag(tag); in addTab()
225 if (info.fragment != null && !info.fragment.isDetached()) { in addTab()
227 ft.detach(info.fragment); in addTab()
247 tab.fragment = mFragmentManager.findFragmentByTag(tab.tag); in onAttachedToWindow()
248 if (tab.fragment != null && !tab.fragment.isDetached()) { in onAttachedToWindow()
260 ft.detach(tab.fragment); in onAttachedToWindow()
325 if (mLastTab.fragment != null) { in doTabChanged()
326 ft.detach(mLastTab.fragment); in doTabChanged()
330 if (newTab.fragment == null) { in doTabChanged()
[all …]
/frameworks/base/core/java/android/app/
DBackStackRecord.java57 mOps[pos++] = op.fragment != null ? op.fragment.mIndex : -1; in BackStackState()
107 op.fragment = f; in instantiate()
109 op.fragment = null; in instantiate()
191 Fragment fragment; field in BackStackRecord.Op
297 writer.print(" "); writer.println(op.fragment); in dump()
378 public FragmentTransaction add(Fragment fragment, String tag) { in add() argument
379 doAddOp(0, fragment, tag, OP_ADD); in add()
383 public FragmentTransaction add(int containerViewId, Fragment fragment) { in add() argument
384 doAddOp(containerViewId, fragment, null, OP_ADD); in add()
388 public FragmentTransaction add(int containerViewId, Fragment fragment, String tag) { in add() argument
[all …]
DFragmentTransaction.java16 public abstract FragmentTransaction add(Fragment fragment, String tag); in add() argument
21 public abstract FragmentTransaction add(int containerViewId, Fragment fragment); in add() argument
38 public abstract FragmentTransaction add(int containerViewId, Fragment fragment, String tag); in add() argument
43 public abstract FragmentTransaction replace(int containerViewId, Fragment fragment); in replace() argument
61 public abstract FragmentTransaction replace(int containerViewId, Fragment fragment, String tag); in replace() argument
71 public abstract FragmentTransaction remove(Fragment fragment); in remove() argument
82 public abstract FragmentTransaction hide(Fragment fragment); in hide() argument
93 public abstract FragmentTransaction show(Fragment fragment); in show() argument
106 public abstract FragmentTransaction detach(Fragment fragment); in detach() argument
118 public abstract FragmentTransaction attach(Fragment fragment); in attach() argument
DFragmentManager.java283 public abstract void putFragment(Bundle bundle, String key, Fragment fragment); in putFragment() argument
557 public void putFragment(Bundle bundle, String key, Fragment fragment) { in putFragment() argument
558 if (fragment.mIndex < 0) { in putFragment()
559 throwException(new IllegalStateException("Fragment " + fragment in putFragment()
562 bundle.putInt(key, fragment.mIndex); in putFragment()
584 public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) { in saveFragmentInstanceState() argument
585 if (fragment.mIndex < 0) { in saveFragmentInstanceState()
586 throwException(new IllegalStateException("Fragment " + fragment in saveFragmentInstanceState()
589 if (fragment.mState > Fragment.INITIALIZING) { in saveFragmentInstanceState()
590 Bundle result = saveFragmentBasicState(fragment); in saveFragmentInstanceState()
[all …]
/frameworks/base/docs/html/guide/components/
Dfragments.jd23 <li><a href="#Adding">Adding a fragment to an activity</a></li>
60 multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a
65 <p>A fragment must always be embedded in an activity and the fragment's lifecycle is directly
70 manipulate each fragment independently, such as add or remove them. When you perform such a
71 fragment transaction, you can also add it to a back stack that's managed by the
72 activity&mdash;each back stack entry in the activity is a record of the fragment transaction that
73 occurred. The back stack allows the user to reverse a fragment transaction (navigate backwards),
76 <p>When you add a fragment as a part of your activity layout, it lives in a {@link
77 android.view.ViewGroup} inside the activity's view hierarchy and the fragment defines its own view
79 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.jd44 <p>For example, on a handset device it might be appropriate to display just one fragment at a time
50 configurations for the same activity on different screen sizes. On a large screen, both fragment
51 fit side by side, but on a handset device, only one fragment fits at a time so the fragments must
62 <a href="creating.html">previous lesson</a> with the {@code &lt;fragment>} element&mdash;you can add
63 a fragment to the activity during the activity runtime. This is necessary
67 remove a fragment, you must use the {@link android.support.v4.app.FragmentManager} to create a
69 and perform other fragment transactions.</p>
72 initial fragment(s) to the activity during the activity's
76 runtime&mdash;is that the fragment must have a container {@link android.view.View} in the layout in
77 which the fragment's layout will reside.</p>
[all …]
Dcreating.jd9 next.link=fragment-ui.html
38 <p>You can think of a fragment as a modular section of an activity, which has its own lifecycle,
55 <p>To create a fragment, extend the {@link android.support.v4.app.Fragment} class, then override
61 In fact, this is the only callback you need in order to get a fragment running. For
62 example, here's a simple fragment that specifies its own layout:</p>
74 // Inflate the layout for this fragment
80 <p>Just like an activity, a fragment should implement other lifecycle callbacks that allow you to
86 <p>More information about the fragment lifecycle and callback methods is available in the <a
96 fragment within your activity layout XML file.</p>
114 &lt;fragment android:name="com.example.android.fragments.HeadlinesFragment"
[all …]
Dcommunicating.jd7 previous.link=fragment-ui.html
82 <p>Now the fragment can deliver messages to the activity by calling the {@code
86 <p>For example, the following method in the fragment is called when the user clicks on a list
87 item. The fragment uses the callback interface to deliver the event to the parent activity.</p>
101 <p>In order to receive event callbacks from the fragment, the activity that hosts it must
102 implement the interface defined in the fragment class.</p>
122 <p>The host activity can deliver messages to a fragment by capturing the {@link
125 directly call the fragment's public methods.</p>
127 <p>For instance, imagine that the activity shown above may contain another fragment that's used to
129 the activity can pass the information received in the callback method to the other fragment that
[all …]
Dindex.jd49 <p>When a fragment specifies its own layout, it can be configured in different combinations with
51 sizes (a small screen might show one fragment at a time, but a large screen can show two or
65 <dd>Learn how to build a fragment and implement basic behaviors within its callback
67 <dt><b><a href="fragment-ui.html">Building a Flexible UI</a></b></dt>
68 <dd>Learn how to build your app with layouts that provide different fragment configurations for
71 <dd>Learn how to set up communication paths from a fragment to the activity and other
/frameworks/base/core/java/android/net/
DUri.java667 private Part fragment; field in Uri.StringUri
670 return fragment == null in getFragmentPart()
671 ? fragment = Part.fromEncoded(parseFragment()) : fragment; in getFragmentPart()
782 .fragment(getFragmentPart()); in buildUpon()
787 .fragment(getFragmentPart()); in buildUpon()
809 String fragment) { in fromParts() argument
818 Part.fromDecoded(fragment)); in fromParts()
831 private final Part fragment; field in Uri.OpaqueUri
833 private OpaqueUri(String scheme, Part ssp, Part fragment) { in OpaqueUri() argument
836 this.fragment = fragment == null ? Part.NULL : fragment; in OpaqueUri()
[all …]
/frameworks/base/core/tests/coretests/src/android/net/
DUriTest.java50 .fragment("foo") in testParcelling()
143 .fragment("tee") in testEqualsAndHashCode()
193 Uri b = a.buildUpon().fragment("new").build(); in testBuildUponOpaqueUri()
204 .fragment("tee") in testBuildUponEncodedOpaqueUri()
206 Uri b = a.buildUpon().fragment("new").build(); in testBuildUponEncodedOpaqueUri()
395 Uri withFragment = uri.buildUpon().fragment("top").build(); in testOpaqueUri()
412 String path, String query, String fragment) { in testHierarchical() argument
430 if (fragment != null) { in testHierarchical()
431 sb.append('#').append(fragment); in testHierarchical()
440 uriString, ssp, uri, scheme, authority, path, query, fragment); in testHierarchical()
[all …]
/frameworks/av/media/libstagefright/rtsp/
DARTSPConnection.cpp972 AString fragment; in addAuthentication() local
973 fragment.append("Authorization: Basic "); in addAuthentication()
974 fragment.append(out); in addAuthentication()
975 fragment.append("\r\n"); in addAuthentication()
977 request->insert(fragment, i + 2); in addAuthentication()
1014 AString fragment; in addAuthentication() local
1015 fragment.append("Authorization: Digest "); in addAuthentication()
1016 fragment.append("nonce=\""); in addAuthentication()
1017 fragment.append(mNonce); in addAuthentication()
1018 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/opt/photoviewer/src/com/android/ex/photo/
DPhotoViewCallbacks.java65 public boolean isFragmentActive(Fragment fragment); in isFragmentActive() argument
67 public void onFragmentVisible(PhotoViewFragment fragment); in onFragmentVisible() argument
69 public boolean isFragmentFullScreen(Fragment fragment); in isFragmentFullScreen() argument

1234