Fragment setMenuVisibility - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Fragment setMenuVisibility method.

This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
//                    makeFragmentName(container.getId(), itemId)); 
            mCurTransaction.add(container.getId(), fragment,
                    getTag(position));
        } 
        if (fragment != mCurrentPrimaryItem) {
            fragment.setMenuVisibility(false);
            fragment.setUserVisibleHint(false);
        } 
 
        return fragment;
    } 
 
    @Override 
    public void destroyItem(ViewGroup container, int position, Object object) {
        if (mCurTransaction == null) {
            mCurTransaction = mFragmentManager.beginTransaction();
        } 
        if (DEBUG) Log.v(TAG, "Detaching item #" + getItemId(position) + ": f=" + object
                + " v=" + ((Fragment) object).getView());
        mCurTransaction.detach((Fragment) object);
Full Snippet Info
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
            SurespotLog.v(TAG, "Adding item #" + itemId + ": f=" + fragment);
            mCurTransaction.add(container.getId(), fragment,
                    makeFragmentName(container.getId(), itemId));
        } 
        if (fragment != mCurrentPrimaryItem) {
            fragment.setMenuVisibility(false);
            fragment.setUserVisibleHint(false);
        } 
 
        return fragment;
    } 
 
    @Override 
    public void destroyItem(ViewGroup container, int position, Object object) {
        if (mCurTransaction == null) {
            mCurTransaction = mFragmentManager.beginTransaction();
        } 
     //   SurespotLog.v(TAG, "Detaching item #" + getItemId(position-1) + ": f=" + object 
     //           + " v=" + ((Fragment)object).getView()); 
        mCurTransaction.detach((Fragment)object);
Full Snippet Info
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		Fragment fragment = (Fragment) object;
		if (fragment != mCurrentPrimaryItem) {
			if (mCurrentPrimaryItem != null) {
				mCurrentPrimaryItem.setMenuVisibility(false);
				mCurrentPrimaryItem.setUserVisibleHint(false);
			} 
			if (fragment != null) {
				fragment.setMenuVisibility(true);
				fragment.setUserVisibleHint(true);
			} 
			mCurrentPrimaryItem = fragment;
		} 
	} 
 
	@Override 
	public void finishUpdate(ViewGroup container) {
		if (mCurTransaction != null) {
			try { 
Full Snippet Info
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
				Log.v(TAG, "Attaching item #" + itemId + ": f=" + fragment);
			mCurTransaction.attach(fragment);
		} else { 
			fragment = getItem(container, position);
			if (fragment instanceof Laziable) {
				mLazyItems.put(position, fragment);
			} else { 
				mCurTransaction.add(container.getId(), fragment, name);
			} 
		} 
		if (fragment != getCurrentItem()) {
			fragment.setMenuVisibility(false);
			fragment.setUserVisibleHint(false);
		} 
 
		return fragment;
	} 
 
	@Override 
	public void destroyItem(ViewGroup container, int position, Object object) {
Full Snippet Info
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		Fragment fragment = (Fragment) object;
		if (fragment != mCurrentPrimaryItem) {
			if (mCurrentPrimaryItem != null) {
				mCurrentPrimaryItem.setMenuVisibility(false);
				mCurrentPrimaryItem.setUserVisibleHint(false);
			} 
			if (fragment != null) {
				fragment.setMenuVisibility(true);
				fragment.setUserVisibleHint(true);
			} 
			mCurrentPrimaryItem = fragment;
		} 
	} 
 
	@Override 
	public void finishUpdate(ViewGroup container) {
		if (mCurTransaction != null) {
			try { 
Full Snippet Info
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
			if (DEBUG)
				Log.v(TAG, "Adding item #" + position + ": f=" + fragment);
			mCurTransaction.add(container.getId(), fragment, makeFragmentName(container.getId(), position));
		} 
		if (fragment != mCurrentPrimaryItem) {
			fragment.setMenuVisibility(false);
			fragment.setUserVisibleHint(false);
		} 
 
		return fragment;
	} 
 
	/** 
	 * This function is the reason why this class is a full copy of 
	 * FragmentPagerAdapter and not an implementation. The app required the 
	 * ability to call functions on each FileListFragment from the main class. 
	 * This function needed to be able to reference mFragmentManger. 
	 *  
	 * @param container  
	 * @param position 
Full Snippet Info
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: setMenuVisibility, setUserVisibleHint
            if (DEBUG) Log.v(TAG, "Adding item #" + itemId + ": f=" + fragment);
            mCurTransaction.add(container.getId(), fragment,
                    makeFragmentName(container.getId(), itemId));
        } 
        if (fragment != mCurrentPrimaryItem) {
            fragment.setMenuVisibility(false);
            fragment.setUserVisibleHint(false);
        } 
 
        return fragment;
    } 
 
    @Override 
    public void destroyItem(ViewGroup container, int position, Object object) {
        if (mCurTransaction == null) {
            mCurTransaction = mFragmentManager.beginTransaction();
        } 
        if (DEBUG) Log.v(TAG, "Detaching item #" + getItemId(position) + ": f=" + object
                + " v=" + ((Fragment)object).getView());
        mCurTransaction.detach((Fragment)object);
Full Snippet Info
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related Fragment setMenuVisibility Questions & Answers:

setMenuVisibility Method Overview
Set a hint for whether this fragment's menu should be visible.
See Code Examples for other Android Fragment Methods: