Best code examples for Fragment getId method (android.app.Fragment.getId)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Fragment getId method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Fragment getId examples from Open Source projects
This code example shows how to use the following methods: getId
        @Override 
        public void onSaveInstanceState(Bundle outState) {
            super.onSaveInstanceState(outState);
            if (mParentFragment != null) {
                outState.putInt(KEY_DIALOG_ID, mDialogId);
                outState.putInt(KEY_PARENT_FRAGMENT_ID, mParentFragment.getId());
            } 
        } 
 
        @Override 
        public void onStart() { 
            super.onStart(); 
 
            if (mParentFragment != null && mParentFragment instanceof SettingsPreferenceFragment) {
                ((SettingsPreferenceFragment) mParentFragment).onDialogShowing();
            } 
        } 
 
        @Override 
        public Dialog onCreateDialog(Bundle savedInstanceState) {
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getActivity, getArguments, getId
 
        mWebView.loadDataWithBaseURL("http://www.janrain.com/blogs/", htmlString, "text/html", "UTF-8", "");
    } 
 
    public int getShownIndex() { 
        return getArguments().getInt("index", 0);
    } 
 
    public Story getShownStory() { 
        return mQuickShare.getFeed().get(getShownIndex());
    } 
     
    public void onClick(View view) {
        if (getActivity() instanceof StoryDetailActivity) {
            ((StoryDetailActivity) getActivity()).startWaiting();
        } 
 
        JRActivityObject jra = mQuickShare.getFeed().get(getShownIndex()).toJRActivityObject();
        if (AndroidUtils.isXlarge() && AndroidUtils.isLandscape()) { 
            mQuickShare.getJREngage().showSocialPublishingFragment(jra, getActivity(), getId(), true,

6
CodeRank
This code example shows how to use the following methods: getId
        @Override 
        public void onSaveInstanceState(Bundle outState) {
            super.onSaveInstanceState(outState);
            if (mParentFragment != null) {
                outState.putInt(KEY_DIALOG_ID, mDialogId);
                outState.putInt(KEY_PARENT_FRAGMENT_ID, mParentFragment.getId());
            } 
        } 
 
        @Override 
        public Dialog onCreateDialog(Bundle savedInstanceState) {
            if (savedInstanceState != null) {
                mDialogId = savedInstanceState.getInt(KEY_DIALOG_ID, 0);
                int mParentFragmentId = savedInstanceState.getInt(KEY_PARENT_FRAGMENT_ID, -1);
                if (mParentFragmentId > -1) {
                    mParentFragment = getFragmentManager().findFragmentById(mParentFragmentId);
                    if (!(mParentFragment instanceof DialogCreatable)) {
                        throw new IllegalArgumentException(
                                KEY_PARENT_FRAGMENT_ID + " must implement "
                                        + DialogCreatable.class.getName());
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: getId
        @Override 
        public void onSaveInstanceState(Bundle outState) {
            super.onSaveInstanceState(outState);
            if (mParentFragment != null) {
                outState.putInt(KEY_DIALOG_ID, mDialogId);
                outState.putInt(KEY_PARENT_FRAGMENT_ID, mParentFragment.getId());
            } 
        } 
 
        @Override 
        public Dialog onCreateDialog(Bundle savedInstanceState) {
            if (savedInstanceState != null) {
                mDialogId = savedInstanceState.getInt(KEY_DIALOG_ID, 0);
                int mParentFragmentId = savedInstanceState.getInt(KEY_PARENT_FRAGMENT_ID, -1);
                if (mParentFragmentId > -1) {
                    mParentFragment = getFragmentManager().findFragmentById(mParentFragmentId);
                    if (!(mParentFragment instanceof DialogCreatable)) {
                        throw new IllegalArgumentException(
                                KEY_PARENT_FRAGMENT_ID + " must implement "
                                        + DialogCreatable.class.getName());
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: getId
        @Override 
        public void onSaveInstanceState(Bundle outState) {
            super.onSaveInstanceState(outState);
            if (mParentFragment != null) {
                outState.putInt(KEY_DIALOG_ID, mDialogId);
                outState.putInt(KEY_PARENT_FRAGMENT_ID, mParentFragment.getId());
            } 
        } 
 
        @Override 
        public Dialog onCreateDialog(Bundle savedInstanceState) {
            if (savedInstanceState != null) {
                mDialogId = savedInstanceState.getInt(KEY_DIALOG_ID, 0);
                int mParentFragmentId = savedInstanceState.getInt(KEY_PARENT_FRAGMENT_ID, -1);
                if (mParentFragmentId > -1) {
                    mParentFragment = getFragmentManager().findFragmentById(mParentFragmentId);
                    if (!(mParentFragment instanceof DialogCreatable)) {
                        throw new IllegalArgumentException(
                                KEY_PARENT_FRAGMENT_ID + " must implement "
                                        + DialogCreatable.class.getName());
Full Snippet Info
4
CodeRank
Related Fragment getId Questions & Answers:
getId Method Overview
Return the identifier this fragment is known by.
See Code Examples for other Android Fragment Methods: