Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

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

public class Main {
    public static void replaceFragment(FragmentManager manager, int parent, Fragment fragment) {
        FragmentTransaction ft = manager.beginTransaction();
        ft.replace(parent, fragment);
        ft.addToBackStack(null);
        ft.commit();
    }
}