endian11
2019-03-25 472ed58776a77ee427f9be3314c75d76b4178d30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package safeluck.drive.evaluation;
 
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
 
import me.yokeyword.fragmentation.Fragmentation;
import me.yokeyword.fragmentation.SupportActivity;
import safeluck.drive.evaluation.fragment.HomeFragment;
 
public class MainActivity extends SupportActivity {
 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //全屏
 
        setContentView(R.layout.activity_main);
 
 
 
        //加载根Fragment
        if (findFragment(HomeFragment.class) == null){
            loadRootFragment(R.id.fl_container,HomeFragment.newInstance());
        }
    }
}