Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.app.Fragment;
import android.app.FragmentManager;

public class Main {
    public static boolean isFragmentInLayout(FragmentManager fragmentManager, int fragmentId) {
        return getFragmentInLayout(fragmentManager, fragmentId) != null;
    }

    public static Fragment getFragmentInLayout(FragmentManager fragmentManager, int fragmentId) {
        return fragmentManager.findFragmentById(fragmentId);
    }
}